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 / 7.3 / 7.3.736 < prev    next >
Encoding:
Internet Message Format  |  2012-11-27  |  7.4 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.736
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.736
  11. Problem:    File name completion in input() escapes white space. (Frederic
  12.         Hardy)
  13. Solution:   Do not escape white space. (Christian Brabandt)
  14. Files:        src/ex_getln.c
  15.  
  16.  
  17. *** ../vim-7.3.735/src/ex_getln.c    2012-10-11 04:04:32.000000000 +0200
  18. --- src/ex_getln.c    2012-11-28 16:42:12.000000000 +0100
  19. ***************
  20. *** 102,108 ****
  21.   static void    redrawcmdprompt __ARGS((void));
  22.   static void    cursorcmd __ARGS((void));
  23.   static int    ccheck_abbr __ARGS((int));
  24. ! static int    nextwild __ARGS((expand_T *xp, int type, int options));
  25.   static void    escape_fname __ARGS((char_u **pp));
  26.   static int    showmatches __ARGS((expand_T *xp, int wildmenu));
  27.   static void    set_expand_context __ARGS((expand_T *xp));
  28. --- 102,108 ----
  29.   static void    redrawcmdprompt __ARGS((void));
  30.   static void    cursorcmd __ARGS((void));
  31.   static int    ccheck_abbr __ARGS((int));
  32. ! static int    nextwild __ARGS((expand_T *xp, int type, int options, int escape));
  33.   static void    escape_fname __ARGS((char_u **pp));
  34.   static int    showmatches __ARGS((expand_T *xp, int wildmenu));
  35.   static void    set_expand_context __ARGS((expand_T *xp));
  36. ***************
  37. *** 810,818 ****
  38.               did_wild_list = TRUE;
  39.           }
  40.           if (wim_flags[wim_index] & WIM_LONGEST)
  41. !             res = nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP);
  42.           else if (wim_flags[wim_index] & WIM_FULL)
  43. !             res = nextwild(&xpc, WILD_NEXT, WILD_NO_BEEP);
  44.           else
  45.               res = OK;        /* don't insert 'wildchar' now */
  46.           }
  47. --- 810,820 ----
  48.               did_wild_list = TRUE;
  49.           }
  50.           if (wim_flags[wim_index] & WIM_LONGEST)
  51. !             res = nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP,
  52. !                                    firstc != '@');
  53.           else if (wim_flags[wim_index] & WIM_FULL)
  54. !             res = nextwild(&xpc, WILD_NEXT, WILD_NO_BEEP,
  55. !                                    firstc != '@');
  56.           else
  57.               res = OK;        /* don't insert 'wildchar' now */
  58.           }
  59. ***************
  60. *** 823,831 ****
  61.           /* if 'wildmode' first contains "longest", get longest
  62.            * common part */
  63.           if (wim_flags[0] & WIM_LONGEST)
  64. !             res = nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP);
  65.           else
  66. !             res = nextwild(&xpc, WILD_EXPAND_KEEP, WILD_NO_BEEP);
  67.   
  68.           /* if interrupted while completing, behave like it failed */
  69.           if (got_int)
  70. --- 825,835 ----
  71.           /* if 'wildmode' first contains "longest", get longest
  72.            * common part */
  73.           if (wim_flags[0] & WIM_LONGEST)
  74. !             res = nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP,
  75. !                                    firstc != '@');
  76.           else
  77. !             res = nextwild(&xpc, WILD_EXPAND_KEEP, WILD_NO_BEEP,
  78. !                                    firstc != '@');
  79.   
  80.           /* if interrupted while completing, behave like it failed */
  81.           if (got_int)
  82. ***************
  83. *** 860,866 ****
  84.                   int p_wmnu_save = p_wmnu;
  85.                   p_wmnu = 0;
  86.   #endif
  87. !                 nextwild(&xpc, WILD_PREV, 0); /* remove match */
  88.   #ifdef FEAT_WILDMENU
  89.                   p_wmnu = p_wmnu_save;
  90.   #endif
  91. --- 864,871 ----
  92.                   int p_wmnu_save = p_wmnu;
  93.                   p_wmnu = 0;
  94.   #endif
  95. !                 /* remove match */
  96. !                 nextwild(&xpc, WILD_PREV, 0, firstc != '@');
  97.   #ifdef FEAT_WILDMENU
  98.                   p_wmnu = p_wmnu_save;
  99.   #endif
  100. ***************
  101. *** 874,882 ****
  102.               redrawcmd();
  103.               did_wild_list = TRUE;
  104.               if (wim_flags[wim_index] & WIM_LONGEST)
  105. !                 nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP);
  106.               else if (wim_flags[wim_index] & WIM_FULL)
  107. !                 nextwild(&xpc, WILD_NEXT, WILD_NO_BEEP);
  108.               }
  109.               else
  110.               vim_beep();
  111. --- 879,889 ----
  112.               redrawcmd();
  113.               did_wild_list = TRUE;
  114.               if (wim_flags[wim_index] & WIM_LONGEST)
  115. !                 nextwild(&xpc, WILD_LONGEST, WILD_NO_BEEP,
  116. !                                    firstc != '@');
  117.               else if (wim_flags[wim_index] & WIM_FULL)
  118. !                 nextwild(&xpc, WILD_NEXT, WILD_NO_BEEP,
  119. !                                    firstc != '@');
  120.               }
  121.               else
  122.               vim_beep();
  123. ***************
  124. *** 899,907 ****
  125.       /* <S-Tab> goes to last match, in a clumsy way */
  126.       if (c == K_S_TAB && KeyTyped)
  127.       {
  128. !         if (nextwild(&xpc, WILD_EXPAND_KEEP, 0) == OK
  129. !             && nextwild(&xpc, WILD_PREV, 0) == OK
  130. !             && nextwild(&xpc, WILD_PREV, 0) == OK)
  131.           goto cmdline_changed;
  132.       }
  133.   
  134. --- 906,914 ----
  135.       /* <S-Tab> goes to last match, in a clumsy way */
  136.       if (c == K_S_TAB && KeyTyped)
  137.       {
  138. !         if (nextwild(&xpc, WILD_EXPAND_KEEP, 0, firstc != '@') == OK
  139. !             && nextwild(&xpc, WILD_PREV, 0, firstc != '@') == OK
  140. !             && nextwild(&xpc, WILD_PREV, 0, firstc != '@') == OK)
  141.           goto cmdline_changed;
  142.       }
  143.   
  144. ***************
  145. *** 1418,1424 ****
  146.           goto cmdline_not_changed;
  147.   
  148.       case Ctrl_A:        /* all matches */
  149. !         if (nextwild(&xpc, WILD_ALL, 0) == FAIL)
  150.               break;
  151.           goto cmdline_changed;
  152.   
  153. --- 1425,1431 ----
  154.           goto cmdline_not_changed;
  155.   
  156.       case Ctrl_A:        /* all matches */
  157. !         if (nextwild(&xpc, WILD_ALL, 0, firstc != '@') == FAIL)
  158.               break;
  159.           goto cmdline_changed;
  160.   
  161. ***************
  162. *** 1454,1460 ****
  163.   #endif
  164.   
  165.           /* completion: longest common part */
  166. !         if (nextwild(&xpc, WILD_LONGEST, 0) == FAIL)
  167.               break;
  168.           goto cmdline_changed;
  169.   
  170. --- 1461,1467 ----
  171.   #endif
  172.   
  173.           /* completion: longest common part */
  174. !         if (nextwild(&xpc, WILD_LONGEST, 0, firstc != '@') == FAIL)
  175.               break;
  176.           goto cmdline_changed;
  177.   
  178. ***************
  179. *** 1462,1469 ****
  180.       case Ctrl_P:        /* previous match */
  181.           if (xpc.xp_numfiles > 0)
  182.           {
  183. !             if (nextwild(&xpc, (c == Ctrl_P) ? WILD_PREV : WILD_NEXT, 0)
  184. !                                       == FAIL)
  185.               break;
  186.               goto cmdline_changed;
  187.           }
  188. --- 1469,1476 ----
  189.       case Ctrl_P:        /* previous match */
  190.           if (xpc.xp_numfiles > 0)
  191.           {
  192. !             if (nextwild(&xpc, (c == Ctrl_P) ? WILD_PREV : WILD_NEXT,
  193. !                             0, firstc != '@') == FAIL)
  194.               break;
  195.               goto cmdline_changed;
  196.           }
  197. ***************
  198. *** 3338,3347 ****
  199.    * normal character (instead of being expanded).  This allows :s/^I^D etc.
  200.    */
  201.       static int
  202. ! nextwild(xp, type, options)
  203.       expand_T    *xp;
  204.       int        type;
  205.       int        options;    /* extra options for ExpandOne() */
  206.   {
  207.       int        i, j;
  208.       char_u    *p1;
  209. --- 3345,3355 ----
  210.    * normal character (instead of being expanded).  This allows :s/^I^D etc.
  211.    */
  212.       static int
  213. ! nextwild(xp, type, options, escape)
  214.       expand_T    *xp;
  215.       int        type;
  216.       int        options;    /* extra options for ExpandOne() */
  217. +     int        escape;        /* if TRUE, escape the returned matches */
  218.   {
  219.       int        i, j;
  220.       char_u    *p1;
  221. ***************
  222. *** 3390,3396 ****
  223.       else
  224.       {
  225.           int use_options = options |
  226. !             WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE;
  227.   
  228.           if (p_wic)
  229.           use_options += WILD_ICASE;
  230. --- 3398,3406 ----
  231.       else
  232.       {
  233.           int use_options = options |
  234. !             WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT;
  235. !         if (escape)
  236. !         use_options |= WILD_ESCAPE;
  237.   
  238.           if (p_wic)
  239.           use_options += WILD_ICASE;
  240. *** ../vim-7.3.735/src/version.c    2012-11-28 16:18:26.000000000 +0100
  241. --- src/version.c    2012-11-28 16:30:45.000000000 +0100
  242. ***************
  243. *** 727,728 ****
  244. --- 727,730 ----
  245.   {   /* Add new patch number below this line */
  246. + /**/
  247. +     736,
  248.   /**/
  249.  
  250. -- 
  251. From "know your smileys":
  252.  ;-0    Can't find shift key
  253.  ,-9    Kann Umschalttaste nicht finden
  254.  
  255.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  256. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  257. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  258.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  259.