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.753 < prev    next >
Encoding:
Internet Message Format  |  2012-12-04  |  3.7 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.753
  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.753
  11. Problem:    When there is a QuitPre autocommand using ":q" twice does not work
  12.         for exiting when there are more files to edit.
  13. Solution:   Do not decrement quitmore in an autocommand. (Techlive Zheng)
  14. Files:        src/ex_docmd.c, src/fileio.c, src/proto/fileio.pro
  15.  
  16.  
  17. *** ../vim-7.3.752/src/ex_docmd.c    2012-11-28 23:03:02.000000000 +0100
  18. --- src/ex_docmd.c    2012-12-05 19:07:01.000000000 +0100
  19. ***************
  20. *** 1729,1739 ****
  21.       ++ex_nesting_level;
  22.   #endif
  23.   
  24. !     /* when not editing the last file :q has to be typed twice */
  25.       if (quitmore
  26.   #ifdef FEAT_EVAL
  27.           /* avoid that a function call in 'statusline' does this */
  28.           && !getline_equal(fgetline, cookie, get_func_line)
  29.   #endif
  30.           )
  31.       --quitmore;
  32. --- 1729,1741 ----
  33.       ++ex_nesting_level;
  34.   #endif
  35.   
  36. !     /* When the last file has not been edited :q has to be typed twice. */
  37.       if (quitmore
  38.   #ifdef FEAT_EVAL
  39.           /* avoid that a function call in 'statusline' does this */
  40.           && !getline_equal(fgetline, cookie, get_func_line)
  41. +         /* avoid that an autocommand, e.g. QuitPre, does this */
  42. +         && !getline_equal(fgetline, cookie, getnextac)
  43.   #endif
  44.           )
  45.       --quitmore;
  46. *** ../vim-7.3.752/src/fileio.c    2012-08-29 18:50:50.000000000 +0200
  47. --- src/fileio.c    2012-12-05 19:08:17.000000000 +0100
  48. ***************
  49. *** 7774,7780 ****
  50.   static int event_ignored __ARGS((event_T event));
  51.   static int au_get_grouparg __ARGS((char_u **argp));
  52.   static int do_autocmd_event __ARGS((event_T event, char_u *pat, int nested, char_u *cmd, int forceit, int group));
  53. - static char_u *getnextac __ARGS((int c, void *cookie, int indent));
  54.   static int apply_autocmds_group __ARGS((event_T event, char_u *fname, char_u *fname_io, int force, int group, buf_T *buf, exarg_T *eap));
  55.   static void auto_next_pat __ARGS((AutoPatCmd *apc, int stop_at_last));
  56.   
  57. --- 7774,7779 ----
  58. ***************
  59. *** 9613,9619 ****
  60.    * Called by do_cmdline() to get the next line for ":if".
  61.    * Returns allocated string, or NULL for end of autocommands.
  62.    */
  63. !     static char_u *
  64.   getnextac(c, cookie, indent)
  65.       int        c UNUSED;
  66.       void    *cookie;
  67. --- 9612,9618 ----
  68.    * Called by do_cmdline() to get the next line for ":if".
  69.    * Returns allocated string, or NULL for end of autocommands.
  70.    */
  71. !     char_u *
  72.   getnextac(c, cookie, indent)
  73.       int        c UNUSED;
  74.       void    *cookie;
  75. *** ../vim-7.3.752/src/proto/fileio.pro    2012-02-29 18:22:03.000000000 +0100
  76. --- src/proto/fileio.pro    2012-12-05 19:08:24.000000000 +0100
  77. ***************
  78. *** 47,52 ****
  79. --- 47,53 ----
  80.   int has_insertcharpre __ARGS((void));
  81.   void block_autocmds __ARGS((void));
  82.   void unblock_autocmds __ARGS((void));
  83. + char_u *getnextac __ARGS((int c, void *cookie, int indent));
  84.   int has_autocmd __ARGS((event_T event, char_u *sfname, buf_T *buf));
  85.   char_u *get_augroup_name __ARGS((expand_T *xp, int idx));
  86.   char_u *set_context_in_autocmd __ARGS((expand_T *xp, char_u *arg, int doautocmd));
  87. *** ../vim-7.3.752/src/version.c    2012-12-05 19:00:03.000000000 +0100
  88. --- src/version.c    2012-12-05 19:08:34.000000000 +0100
  89. ***************
  90. *** 727,728 ****
  91. --- 727,730 ----
  92.   {   /* Add new patch number below this line */
  93. + /**/
  94. +     753,
  95.   /**/
  96.  
  97. -- 
  98. Laughing helps. It's like jogging on the inside.
  99.  
  100.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  101. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  102. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  103.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  104.