4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Crash when the completion function of a user-command uses a
12 "normal :cmd" command. (Hari Krishna Dara)
13 Solution: Save the command line when invoking the completion function.
17 *** ../vim-6.3.010/src/ex_getln.c Wed Jun 9 14:56:25 2004
18 --- src/ex_getln.c Fri Jul 2 21:55:55 2004
24 int save_current_SID = current_SID;
25 + struct cmdline_info save_ccline;
27 if (xp->xp_arg == NULL || xp->xp_arg[0] == '\0')
32 args[1] = ccline.cmdbuff;
35 + /* Save the cmdline, we don't know what the function may do. */
36 + save_ccline = ccline;
37 + ccline.cmdbuff = NULL;
38 + ccline.cmdprompt = NULL;
39 current_SID = xp->xp_scriptID;
41 all = call_vim_function(xp->xp_arg, 3, args, FALSE);
43 + ccline = save_ccline;
44 current_SID = save_current_SID;
46 ccline.cmdbuff[ccline.cmdlen] = keep;
49 *** ../vim-6.3.010/src/version.c Tue Jun 29 20:07:02 2004
50 --- src/version.c Fri Jul 2 21:59:54 2004
54 { /* Add new patch number below this line */
60 Save the plankton - eat a whale.
62 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
63 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
64 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
65 \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///