home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.0.157 < prev    next >
Encoding:
Internet Message Format  |  2002-01-29  |  2.5 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.157
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.0.157
  11. Problem:    When defining a user command with "-complete=dir" files will also
  12.         be expanded.  Also, "-complete=mapping" doesn't appear to work.
  13.         (Michael Naumann)
  14. Solution:   Use the expansion flags defined with the user command.
  15.         Handle expanding mappings specifically.
  16. Files:        src/ex_docmd.c
  17.  
  18.  
  19. *** ../vim60.156/src/ex_docmd.c    Tue Jan 15 14:34:37 2002
  20. --- src/ex_docmd.c    Wed Jan 30 16:48:00 2002
  21. ***************
  22. *** 2770,2788 ****
  23.   #ifdef FEAT_USR_CMDS
  24.       case CMD_USER:
  25.       case CMD_USER_BUF:
  26. !         /* XFILE: file names are handled above */
  27. !         if (compl != EXPAND_NOTHING && !(argt & XFILE))
  28.           {
  29.   # ifdef FEAT_MENU
  30. !         if (compl == EXPAND_MENUS)
  31. !             return set_context_in_menu_cmd(xp, cmd, arg, forceit);
  32.   # endif
  33. !         if (compl == EXPAND_COMMANDS)
  34. !             return arg;
  35. !         while ((xp->xp_pattern = vim_strchr(arg, ' ')) != NULL)
  36. !             arg = xp->xp_pattern + 1;
  37.           xp->xp_context = compl;
  38. -         xp->xp_pattern = arg;
  39.           }
  40.           break;
  41.   #endif
  42. --- 2770,2794 ----
  43.   #ifdef FEAT_USR_CMDS
  44.       case CMD_USER:
  45.       case CMD_USER_BUF:
  46. !         if (compl != EXPAND_NOTHING)
  47.           {
  48. +         /* XFILE: file names are handled above */
  49. +         if (!(argt & XFILE))
  50. +         {
  51.   # ifdef FEAT_MENU
  52. !             if (compl == EXPAND_MENUS)
  53. !             return set_context_in_menu_cmd(xp, cmd, arg, forceit);
  54.   # endif
  55. !             if (compl == EXPAND_COMMANDS)
  56. !             return arg;
  57. !             if (compl == EXPAND_MAPPINGS)
  58. !             return set_context_in_map_cmd(xp, (char_u *)"map",
  59. !                      arg, forceit, FALSE, FALSE, CMD_map);
  60. !             while ((xp->xp_pattern = vim_strchr(arg, ' ')) != NULL)
  61. !             arg = xp->xp_pattern + 1;
  62. !             xp->xp_pattern = arg;
  63. !         }
  64.           xp->xp_context = compl;
  65.           }
  66.           break;
  67.   #endif
  68. *** ../vim60.156/src/version.c    Wed Jan 30 16:50:08 2002
  69. --- src/version.c    Wed Jan 30 16:49:36 2002
  70. ***************
  71. *** 608,609 ****
  72. --- 608,611 ----
  73.   {   /* Add new patch number below this line */
  74. + /**/
  75. +     157,
  76.   /**/
  77.  
  78. -- 
  79. hundred-and-one symptoms of being an internet addict:
  80. 94. Now admit it... How many of you have made "modem noises" into
  81.     the phone just to see if it was possible? :-)
  82.  
  83.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  84. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  85.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  86.