1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Completion for a user command does not recognize backslash before
13 Solution: Recognize escaped characters. (Yasuhiro Matsumoto)
17 *** ../vim-7.3.614/src/ex_docmd.c 2012-07-10 19:25:06.000000000 +0200
18 --- src/ex_docmd.c 2012-07-25 17:10:16.000000000 +0200
23 /* Find start of last argument (argument just before cursor): */
24 ! p = buff + STRLEN(buff);
25 ! while (p != arg && *p != ' ' && *p != TAB)
27 ! if (*p == ' ' || *p == TAB)
36 /* Find start of last argument (argument just before cursor): */
40 + while (*p && p < buff + len)
42 + if (*p == ' ' || *p == TAB)
44 + /* argument starts after a space */
45 + xp->xp_pattern = ++p;
49 + if (*p == '\\' && *(p + 1) != NUL)
50 + ++p; /* skip over escaped character */
59 if (compl == EXPAND_MAPPINGS)
60 return set_context_in_map_cmd(xp, (char_u *)"map",
61 arg, forceit, FALSE, FALSE, CMD_map);
62 ! while ((xp->xp_pattern = vim_strchr(arg, ' ')) != NULL)
63 ! arg = xp->xp_pattern + 1;
66 xp->xp_context = compl;
68 if (compl == EXPAND_MAPPINGS)
69 return set_context_in_map_cmd(xp, (char_u *)"map",
70 arg, forceit, FALSE, FALSE, CMD_map);
71 ! /* Find start of last argument. */
77 ! /* argument starts after a space */
82 ! if (*p == '\\' && *(p + 1) != NUL)
83 ! ++p; /* skip over escaped character */
89 xp->xp_context = compl;
90 *** ../vim-7.3.614/src/version.c 2012-07-25 16:46:59.000000000 +0200
91 --- src/version.c 2012-07-25 17:17:05.000000000 +0200
95 { /* Add new patch number below this line */
101 hundred-and-one symptoms of being an internet addict:
102 172. You join listservers just for the extra e-mail.
104 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
105 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
106 \\\ an exciting new programming language -- http://www.Zimbu.org ///
107 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///