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.3 / 6.3.011 < prev    next >
Encoding:
Internet Message Format  |  2004-07-01  |  1.9 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.3.011
  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.3.011
  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.
  14. Files:        src/ex_getln.c
  15.  
  16.  
  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
  19. ***************
  20. *** 3974,3979 ****
  21. --- 3974,3980 ----
  22.       char_u      num[50];
  23.       garray_T    ga;
  24.       int        save_current_SID = current_SID;
  25. +     struct cmdline_info        save_ccline;
  26.   
  27.       if (xp->xp_arg == NULL || xp->xp_arg[0] == '\0')
  28.       return FAIL;
  29. ***************
  30. *** 3987,3995 ****
  31. --- 3988,4004 ----
  32.       args[1] = ccline.cmdbuff;
  33.       args[2] = num;
  34.   
  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;
  40.       all = call_vim_function(xp->xp_arg, 3, args, FALSE);
  41. +     ccline = save_ccline;
  42.       current_SID = save_current_SID;
  43.       ccline.cmdbuff[ccline.cmdlen] = keep;
  44.       if (all == NULL)
  45.       return FAIL;
  46. *** ../vim-6.3.010/src/version.c    Tue Jun 29 20:07:02 2004
  47. --- src/version.c    Fri Jul  2 21:59:54 2004
  48. ***************
  49. *** 643,644 ****
  50. --- 643,646 ----
  51.   {   /* Add new patch number below this line */
  52. + /**/
  53. +     11,
  54.   /**/
  55.  
  56. -- 
  57. Save the plankton - eat a whale.
  58.  
  59.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  60. ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  61. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  62.  \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
  63.