r1049 - in /trunk/packages/vim: debian/README debian/changelog upstream/patches/7.1.123 upstream/patches/7.1.124 upstream/patches/7.1.125

jamessan at users.alioth.debian.org jamessan at users.alioth.debian.org
Sun Sep 30 04:56:17 UTC 2007


Author: jamessan
Date: Sun Sep 30 04:56:17 2007
New Revision: 1049

URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=1049
Log:
* New upstream patches (057 - 125), see README.gz for details.

Added:
    trunk/packages/vim/upstream/patches/7.1.123
    trunk/packages/vim/upstream/patches/7.1.124
    trunk/packages/vim/upstream/patches/7.1.125
Modified:
    trunk/packages/vim/debian/README
    trunk/packages/vim/debian/changelog

Modified: trunk/packages/vim/debian/README
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/README?rev=1049&op=diff
==============================================================================
--- trunk/packages/vim/debian/README (original)
+++ trunk/packages/vim/debian/README Sun Sep 30 04:56:17 2007
@@ -151,3 +151,6 @@
  17416  7.1.120  can't use valgrind with "make test" to test for memory leaks
   2350  7.1.121  ":cd %:h" fails when editing file in current directory
   3732  7.1.122  Mac: building with Aap doesn't work properly
+  8051  7.1.123  Win32: ":edit foo ~ foo" expands "~"
+  2599  7.1.124  (extra) Mac: may get empty buffer if dropping file on Vim.app
+ 12060  7.1.125  the TermResponse autocommand event is not always triggered

Modified: trunk/packages/vim/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/changelog?rev=1049&op=diff
==============================================================================
--- trunk/packages/vim/debian/changelog (original)
+++ trunk/packages/vim/debian/changelog Sun Sep 30 04:56:17 2007
@@ -1,7 +1,7 @@
-vim (1:7.1-122+1) UNRELEASED; urgency=low
+vim (1:7.1-125+1) UNRELEASED; urgency=low
 
   [ Debian Vim Maintainers ]
-  * New upstream patches (057 - 122), see README.gz for details.
+  * New upstream patches (057 - 125), see README.gz for details.
 
   [ Stefano Zacchiroli ]
   * debian/control
@@ -21,7 +21,7 @@
   * Add de.po.diff to fix the translation of "Load File".  Thanks Torsten
     Werner.  (Closes: #443529)
 
- -- James Vega <jamessan at debian.org>  Sun, 30 Sep 2007 00:53:56 -0400
+ -- James Vega <jamessan at debian.org>  Sun, 30 Sep 2007 00:55:30 -0400
 
 vim (1:7.1-056+2) unstable; urgency=low
 

Added: trunk/packages/vim/upstream/patches/7.1.123
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.123?rev=1049&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.123 (added)
+++ trunk/packages/vim/upstream/patches/7.1.123 Sun Sep 30 04:56:17 2007
@@ -1,0 +1,259 @@
+To: vim-dev at vim.org
+Subject: patch 7.1.123
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.123
+Problem:    Win32: ":edit foo ~ foo" expands "~".
+Solution:   Change the call to expand_env().
+Files:	    src/ex_docmd.c, src/misc1.c, src/proto/misc1.pro, src/option.c
+
+
+*** ../vim-7.1.122/src/ex_docmd.c	Sun Aug 19 22:42:27 2007
+--- src/ex_docmd.c	Wed Sep 26 20:29:36 2007
+***************
+*** 4403,4409 ****
+  			    || vim_strchr(eap->arg, '~') != NULL)
+  		    {
+  			expand_env_esc(eap->arg, NameBuff, MAXPATHL,
+! 								 TRUE, NULL);
+  			has_wildcards = mch_has_wildcard(NameBuff);
+  			p = NameBuff;
+  		    }
+--- 4402,4408 ----
+  			    || vim_strchr(eap->arg, '~') != NULL)
+  		    {
+  			expand_env_esc(eap->arg, NameBuff, MAXPATHL,
+! 							    TRUE, TRUE, NULL);
+  			has_wildcards = mch_has_wildcard(NameBuff);
+  			p = NameBuff;
+  		    }
+*** ../vim-7.1.122/src/misc1.c	Tue Aug 14 22:15:53 2007
+--- src/misc1.c	Tue Sep 25 17:30:01 2007
+***************
+*** 3506,3514 ****
+  #endif
+  
+  /*
+   * Expand environment variable with path name.
+   * "~/" is also expanded, using $HOME.	For Unix "~user/" is expanded.
+!  * Skips over "\ ", "\~" and "\$".
+   * If anything fails no expansion is done and dst equals src.
+   */
+      void
+--- 3506,3543 ----
+  #endif
+  
+  /*
++  * Call expand_env() and store the result in an allocated string.
++  * This is not very memory efficient, this expects the result to be freed
++  * again soon.
++  */
++     char_u *
++ expand_env_save(src)
++     char_u	*src;
++ {
++     return expand_env_save_opt(src, FALSE);
++ }
++ 
++ /*
++  * Idem, but when "one" is TRUE handle the string as one file name, only
++  * expand "~" at the start.
++  */
++     char_u *
++ expand_env_save_opt(src, one)
++     char_u	*src;
++     int		one;
++ {
++     char_u	*p;
++ 
++     p = alloc(MAXPATHL);
++     if (p != NULL)
++ 	expand_env_esc(src, p, MAXPATHL, FALSE, one, NULL);
++     return p;
++ }
++ 
++ /*
+   * Expand environment variable with path name.
+   * "~/" is also expanded, using $HOME.	For Unix "~user/" is expanded.
+!  * Skips over "\ ", "\~" and "\$" (not for Win32 though).
+   * If anything fails no expansion is done and dst equals src.
+   */
+      void
+***************
+*** 3517,3531 ****
+      char_u	*dst;		/* where to put the result */
+      int		dstlen;		/* maximum length of the result */
+  {
+!     expand_env_esc(src, dst, dstlen, FALSE, NULL);
+  }
+  
+      void
+! expand_env_esc(srcp, dst, dstlen, esc, startstr)
+      char_u	*srcp;		/* input string e.g. "$HOME/vim.hlp" */
+      char_u	*dst;		/* where to put the result */
+      int		dstlen;		/* maximum length of the result */
+      int		esc;		/* escape spaces in expanded variables */
+      char_u	*startstr;	/* start again after this (can be NULL) */
+  {
+      char_u	*src;
+--- 3546,3561 ----
+      char_u	*dst;		/* where to put the result */
+      int		dstlen;		/* maximum length of the result */
+  {
+!     expand_env_esc(src, dst, dstlen, FALSE, FALSE, NULL);
+  }
+  
+      void
+! expand_env_esc(srcp, dst, dstlen, esc, one, startstr)
+      char_u	*srcp;		/* input string e.g. "$HOME/vim.hlp" */
+      char_u	*dst;		/* where to put the result */
+      int		dstlen;		/* maximum length of the result */
+      int		esc;		/* escape spaces in expanded variables */
++     int		one;		/* "srcp" is one file name */
+      char_u	*startstr;	/* start again after this (can be NULL) */
+  {
+      char_u	*src;
+***************
+*** 3766,3771 ****
+--- 3796,3803 ----
+  	{
+  	    /*
+  	     * Recognize the start of a new name, for '~'.
++ 	     * Don't do this when "one" is TRUE, to avoid expanding "~" in
++ 	     * ":edit foo ~ foo".
+  	     */
+  	    at_start = FALSE;
+  	    if (src[0] == '\\' && src[1] != NUL)
+***************
+*** 3773,3779 ****
+  		*dst++ = *src++;
+  		--dstlen;
+  	    }
+! 	    else if (src[0] == ' ' || src[0] == ',')
+  		at_start = TRUE;
+  	    *dst++ = *src++;
+  	    --dstlen;
+--- 3805,3811 ----
+  		*dst++ = *src++;
+  		--dstlen;
+  	    }
+! 	    else if ((src[0] == ' ' || src[0] == ',') && !one)
+  		at_start = TRUE;
+  	    *dst++ = *src++;
+  	    --dstlen;
+***************
+*** 4070,4092 ****
+  }
+  
+  /*
+-  * Call expand_env() and store the result in an allocated string.
+-  * This is not very memory efficient, this expects the result to be freed
+-  * again soon.
+-  */
+-     char_u *
+- expand_env_save(src)
+-     char_u	*src;
+- {
+-     char_u	*p;
+- 
+-     p = alloc(MAXPATHL);
+-     if (p != NULL)
+- 	expand_env(src, p, MAXPATHL);
+-     return p;
+- }
+- 
+- /*
+   * Our portable version of setenv.
+   */
+      void
+--- 4102,4107 ----
+***************
+*** 9139,9145 ****
+  	     */
+  	    if (vim_strpbrk(p, (char_u *)"$~") != NULL)
+  	    {
+! 		p = expand_env_save(p);
+  		if (p == NULL)
+  		    p = pat[i];
+  #ifdef UNIX
+--- 9154,9160 ----
+  	     */
+  	    if (vim_strpbrk(p, (char_u *)"$~") != NULL)
+  	    {
+! 		p = expand_env_save_opt(p, TRUE);
+  		if (p == NULL)
+  		    p = pat[i];
+  #ifdef UNIX
+*** ../vim-7.1.122/src/proto/misc1.pro	Sat May  5 20:15:33 2007
+--- src/proto/misc1.pro	Tue Sep 25 17:22:36 2007
+***************
+*** 48,57 ****
+  void vim_beep __ARGS((void));
+  void init_homedir __ARGS((void));
+  void free_homedir __ARGS((void));
+  void expand_env __ARGS((char_u *src, char_u *dst, int dstlen));
+! void expand_env_esc __ARGS((char_u *srcp, char_u *dst, int dstlen, int esc, char_u *startstr));
+  char_u *vim_getenv __ARGS((char_u *name, int *mustfree));
+- char_u *expand_env_save __ARGS((char_u *src));
+  void vim_setenv __ARGS((char_u *name, char_u *val));
+  char_u *get_env_name __ARGS((expand_T *xp, int idx));
+  void home_replace __ARGS((buf_T *buf, char_u *src, char_u *dst, int dstlen, int one));
+--- 48,58 ----
+  void vim_beep __ARGS((void));
+  void init_homedir __ARGS((void));
+  void free_homedir __ARGS((void));
++ char_u *expand_env_save __ARGS((char_u *src));
++ char_u *expand_env_save_opt __ARGS((char_u *src, int one));
+  void expand_env __ARGS((char_u *src, char_u *dst, int dstlen));
+! void expand_env_esc __ARGS((char_u *srcp, char_u *dst, int dstlen, int esc, int one, char_u *startstr));
+  char_u *vim_getenv __ARGS((char_u *name, int *mustfree));
+  void vim_setenv __ARGS((char_u *name, char_u *val));
+  char_u *get_env_name __ARGS((expand_T *xp, int idx));
+  void home_replace __ARGS((buf_T *buf, char_u *src, char_u *dst, int dstlen, int one));
+*** ../vim-7.1.122/src/option.c	Tue Sep 25 14:50:19 2007
+--- src/option.c	Tue Sep 25 17:20:05 2007
+***************
+*** 4996,5002 ****
+       * For 'spellsuggest' expand after "file:".
+       */
+      expand_env_esc(val, NameBuff, MAXPATHL,
+! 	    (char_u **)options[opt_idx].var == &p_tags,
+  #ifdef FEAT_SPELL
+  	    (char_u **)options[opt_idx].var == &p_sps ? (char_u *)"file:" :
+  #endif
+--- 4996,5002 ----
+       * For 'spellsuggest' expand after "file:".
+       */
+      expand_env_esc(val, NameBuff, MAXPATHL,
+! 	    (char_u **)options[opt_idx].var == &p_tags, FALSE,
+  #ifdef FEAT_SPELL
+  	    (char_u **)options[opt_idx].var == &p_sps ? (char_u *)"file:" :
+  #endif
+*** ../vim-7.1.122/src/version.c	Tue Sep 25 22:13:14 2007
+--- src/version.c	Wed Sep 26 22:30:59 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     123,
+  /**/
+
+-- 
+So when I saw the post to comp.editors, I rushed over to the FTP site to
+grab it.  So I yank apart the tarball, light x candles, where x= the
+vim version multiplied by the md5sum of the source divided by the MAC of
+my NIC (8A3FA78155A8A1D346C3C4A), put on black robes, dim the lights,
+wave a dead chicken over the hard drive, and summon the power of GNU GCC
+with the magic words "make config ; make!".
+		[Jason Spence, compiling Vim 5.0]
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Added: trunk/packages/vim/upstream/patches/7.1.124
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.124?rev=1049&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.124 (added)
+++ trunk/packages/vim/upstream/patches/7.1.124 Sun Sep 30 04:56:17 2007
@@ -1,0 +1,82 @@
+To: vim-dev at vim.org
+Subject: patch 7.1.124
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.124 (extra)
+Problem:    Mac: When dropping a file on Vim.app that is already in the buffer
+	    list (from .viminfo) results in editing an empty, unnamed buffer.
+	    (Axel Kielhorn)  Also: warning for unused variable.
+Solution:   Move to the buffer of the first agument.  Delete unused variable.
+Files:	    src/gui_mac.c
+
+
+*** ../vim-7.1.123/src/gui_mac.c	Thu Aug 30 12:50:00 2007
+--- src/gui_mac.c	Sat Sep 29 13:12:26 2007
+***************
+*** 1046,1051 ****
+--- 1046,1052 ----
+      {
+  	int i;
+  	char_u *p;
++ 	int fnum = -1;
+  
+  	/* these are the initial files dropped on the Vim icon */
+  	for (i = 0 ; i < numFiles; i++)
+***************
+*** 1055,1060 ****
+--- 1056,1073 ----
+  		mch_exit(2);
+  	    else
+  		alist_add(&global_alist, p, 2);
++ 	    if (fnum == -1)
++ 		fnum = GARGLIST[GARGCOUNT - 1].ae_fnum;
++ 	}
++ 
++ 	/* If the file name was already in the buffer list we need to switch
++ 	 * to it. */
++ 	if (curbuf->b_fnum != fnum)
++ 	{
++ 	    char_u cmd[30];
++ 
++ 	    vim_snprintf((char *)cmd, 30, "silent %dbuffer", fnum);
++ 	    do_cmdline_cmd(cmd);
+  	}
+  
+  	/* Change directory to the location of the first file. */
+***************
+*** 2920,2926 ****
+      /* TODO: Move most of this stuff toward gui_mch_init */
+      Rect	windRect;
+      MenuHandle	pomme;
+-     long	gestalt_rc;
+      EventTypeSpec   eventTypeSpec;
+      EventHandlerRef mouseWheelHandlerRef;
+  #ifdef USE_CARBONKEYHANDLER
+--- 2933,2938 ----
+*** ../vim-7.1.123/src/version.c	Wed Sep 26 22:35:06 2007
+--- src/version.c	Sat Sep 29 13:13:16 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     124,
+  /**/
+
+-- 
+ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
+                  KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T
+                  HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
+                  LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER),
+                  BROTHER MAYNARD
+                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Added: trunk/packages/vim/upstream/patches/7.1.125
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/upstream/patches/7.1.125?rev=1049&op=file
==============================================================================
--- trunk/packages/vim/upstream/patches/7.1.125 (added)
+++ trunk/packages/vim/upstream/patches/7.1.125 Sun Sep 30 04:56:17 2007
@@ -1,0 +1,454 @@
+To: vim-dev at vim.org
+Subject: patch 7.1.125
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.1.125
+Problem:    The TermResponse autocommand event is not always triggered. (Aron
+	    Griffix)
+Solution:   When unblocking autocommands check if v:termresponse changed and
+	    trigger the event then.
+Files:	    src/buffer.c, src/diff.c, src/ex_getln.c, src/fileio.c,
+	    src/globals.h, src/misc2.c, src/proto/fileio.pro, src/window.c
+
+
+*** ../vim-7.1.124/src/buffer.c	Sun Aug 12 15:50:26 2007
+--- src/buffer.c	Wed Sep 26 20:05:38 2007
+***************
+*** 5515,5525 ****
+  
+  #ifdef FEAT_AUTOCMD
+      if (!aucmd)		    /* Don't trigger BufDelete autocommands here. */
+! 	++autocmd_block;
+  #endif
+      close_buffer(NULL, buf, DOBUF_WIPE);
+  #ifdef FEAT_AUTOCMD
+      if (!aucmd)
+! 	--autocmd_block;
+  #endif
+  }
+--- 5512,5522 ----
+  
+  #ifdef FEAT_AUTOCMD
+      if (!aucmd)		    /* Don't trigger BufDelete autocommands here. */
+! 	block_autocmds();
+  #endif
+      close_buffer(NULL, buf, DOBUF_WIPE);
+  #ifdef FEAT_AUTOCMD
+      if (!aucmd)
+! 	unblock_autocmds();
+  #endif
+  }
+*** ../vim-7.1.124/src/diff.c	Tue Feb 20 04:43:13 2007
+--- src/diff.c	Tue Sep 25 22:01:40 2007
+***************
+*** 840,850 ****
+  		    tmp_orig, tmp_new);
+  	    append_redir(cmd, p_srr, tmp_diff);
+  #ifdef FEAT_AUTOCMD
+! 	    ++autocmd_block;	/* Avoid ShellCmdPost stuff */
+  #endif
+  	    (void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT);
+  #ifdef FEAT_AUTOCMD
+! 	    --autocmd_block;
+  #endif
+  	    vim_free(cmd);
+  	}
+--- 840,850 ----
+  		    tmp_orig, tmp_new);
+  	    append_redir(cmd, p_srr, tmp_diff);
+  #ifdef FEAT_AUTOCMD
+! 	    block_autocmds();	/* Avoid ShellCmdPost stuff */
+  #endif
+  	    (void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT);
+  #ifdef FEAT_AUTOCMD
+! 	    unblock_autocmds();
+  #endif
+  	    vim_free(cmd);
+  	}
+***************
+*** 949,959 ****
+  # endif
+  		eap->arg);
+  #ifdef FEAT_AUTOCMD
+! 	++autocmd_block;	/* Avoid ShellCmdPost stuff */
+  #endif
+  	(void)call_shell(buf, SHELL_FILTER | SHELL_COOKED);
+  #ifdef FEAT_AUTOCMD
+! 	--autocmd_block;
+  #endif
+      }
+  
+--- 949,959 ----
+  # endif
+  		eap->arg);
+  #ifdef FEAT_AUTOCMD
+! 	block_autocmds();	/* Avoid ShellCmdPost stuff */
+  #endif
+  	(void)call_shell(buf, SHELL_FILTER | SHELL_COOKED);
+  #ifdef FEAT_AUTOCMD
+! 	unblock_autocmds();
+  #endif
+      }
+  
+*** ../vim-7.1.124/src/ex_getln.c	Thu Sep 13 18:25:08 2007
+--- src/ex_getln.c	Tue Sep 25 22:03:05 2007
+***************
+*** 5925,5931 ****
+  
+  # ifdef FEAT_AUTOCMD
+      /* Don't execute autocommands while creating the window. */
+!     ++autocmd_block;
+  # endif
+      /* don't use a new tab page */
+      cmdmod.tab = 0;
+--- 5925,5931 ----
+  
+  # ifdef FEAT_AUTOCMD
+      /* Don't execute autocommands while creating the window. */
+!     block_autocmds();
+  # endif
+      /* don't use a new tab page */
+      cmdmod.tab = 0;
+***************
+*** 5934,5939 ****
+--- 5934,5942 ----
+      if (win_split((int)p_cwh, WSP_BOT) == FAIL)
+      {
+  	beep_flush();
++ # ifdef FEAT_AUTOCMD
++ 	unblock_autocmds();
++ # endif
+  	return K_IGNORE;
+      }
+      cmdwin_type = ccline.cmdfirstc;
+***************
+*** 5956,5962 ****
+  
+  # ifdef FEAT_AUTOCMD
+      /* Do execute autocommands for setting the filetype (load syntax). */
+!     --autocmd_block;
+  # endif
+  
+      /* Showing the prompt may have set need_wait_return, reset it. */
+--- 5959,5965 ----
+  
+  # ifdef FEAT_AUTOCMD
+      /* Do execute autocommands for setting the filetype (load syntax). */
+!     unblock_autocmds();
+  # endif
+  
+      /* Showing the prompt may have set need_wait_return, reset it. */
+***************
+*** 6110,6116 ****
+  
+  # ifdef FEAT_AUTOCMD
+  	/* Don't execute autocommands while deleting the window. */
+! 	++autocmd_block;
+  # endif
+  	wp = curwin;
+  	bp = curbuf;
+--- 6113,6119 ----
+  
+  # ifdef FEAT_AUTOCMD
+  	/* Don't execute autocommands while deleting the window. */
+! 	block_autocmds();
+  # endif
+  	wp = curwin;
+  	bp = curbuf;
+***************
+*** 6122,6128 ****
+  	win_size_restore(&winsizes);
+  
+  # ifdef FEAT_AUTOCMD
+! 	--autocmd_block;
+  # endif
+      }
+  
+--- 6125,6131 ----
+  	win_size_restore(&winsizes);
+  
+  # ifdef FEAT_AUTOCMD
+! 	unblock_autocmds();
+  # endif
+      }
+  
+*** ../vim-7.1.124/src/fileio.c	Sun Aug 12 15:50:26 2007
+--- src/fileio.c	Wed Sep 26 20:02:54 2007
+***************
+*** 7165,7170 ****
+--- 7187,7193 ----
+  
+  static event_T	last_event;
+  static int	last_group;
++ static int	autocmd_blocked = 0;	/* block all autocmds */
+  
+  /*
+   * Show the autocommands for one AutoPat.
+***************
+*** 8454,8460 ****
+       * Quickly return if there are no autocommands for this event or
+       * autocommands are blocked.
+       */
+!     if (first_autopat[(int)event] == NULL || autocmd_block > 0)
+  	goto BYPASS_AU;
+  
+      /*
+--- 8477,8483 ----
+       * Quickly return if there are no autocommands for this event or
+       * autocommands are blocked.
+       */
+!     if (first_autopat[(int)event] == NULL || autocmd_blocked > 0)
+  	goto BYPASS_AU;
+  
+      /*
+***************
+*** 8766,8771 ****
+--- 8789,8828 ----
+  	aubuflocal_remove(buf);
+  
+      return retval;
++ }
++ 
++ # ifdef FEAT_EVAL
++ static char_u	*old_termresponse = NULL;
++ # endif
++ 
++ /*
++  * Block triggering autocommands until unblock_autocmd() is called.
++  * Can be used recursively, so long as it's symmetric.
++  */
++     void
++ block_autocmds()
++ {
++ # ifdef FEAT_EVAL
++     /* Remember the value of v:termresponse. */
++     if (autocmd_blocked == 0)
++ 	old_termresponse = get_vim_var_str(VV_TERMRESPONSE);
++ # endif
++     ++autocmd_blocked;
++ }
++ 
++     void
++ unblock_autocmds()
++ {
++     --autocmd_blocked;
++ 
++ # ifdef FEAT_EVAL
++     /* When v:termresponse was set while autocommands were blocked, trigger
++      * the autocommands now.  Esp. useful when executing a shell command
++      * during startup (vimdiff). */
++     if (autocmd_blocked == 0
++ 		      && get_vim_var_str(VV_TERMRESPONSE) != old_termresponse)
++ 	apply_autocmds(EVENT_TERMRESPONSE, NULL, NULL, FALSE, curbuf);
++ # endif
+  }
+  
+  /*
+*** ../vim-7.1.124/src/globals.h	Tue Sep 25 17:54:41 2007
+--- src/globals.h	Tue Sep 25 22:03:39 2007
+***************
+*** 366,372 ****
+  EXTERN int	autocmd_busy INIT(= FALSE);	/* Is apply_autocmds() busy? */
+  EXTERN int	autocmd_no_enter INIT(= FALSE); /* *Enter autocmds disabled */
+  EXTERN int	autocmd_no_leave INIT(= FALSE); /* *Leave autocmds disabled */
+- EXTERN int	autocmd_block INIT(= 0);	/* block all autocmds */
+  EXTERN int	modified_was_set;		/* did ":set modified" */
+  EXTERN int	did_filetype INIT(= FALSE);	/* FileType event found */
+  EXTERN int	keep_filetype INIT(= FALSE);	/* value for did_filetype when
+--- 366,371 ----
+*** ../vim-7.1.124/src/misc2.c	Thu May 10 19:58:47 2007
+--- src/misc2.c	Tue Sep 25 22:04:39 2007
+***************
+*** 972,978 ****
+  	return;
+      entered = TRUE;
+  
+!     ++autocmd_block;	    /* don't want to trigger autocommands here */
+  
+  #ifdef FEAT_WINDOWS
+      /* close all tabs and windows */
+--- 973,979 ----
+  	return;
+      entered = TRUE;
+  
+!     block_autocmds();	    /* don't want to trigger autocommands here */
+  
+  #ifdef FEAT_WINDOWS
+      /* close all tabs and windows */
+*** ../vim-7.1.124/src/proto/fileio.pro	Thu Jun 28 21:57:08 2007
+--- src/proto/fileio.pro	Wed Sep 26 20:05:02 2007
+***************
+*** 40,45 ****
+--- 41,48 ----
+  int trigger_cursorhold __ARGS((void));
+  int has_cursormoved __ARGS((void));
+  int has_cursormovedI __ARGS((void));
++ void block_autocmds __ARGS((void));
++ void unblock_autocmds __ARGS((void));
+  int has_autocmd __ARGS((event_T event, char_u *sfname, buf_T *buf));
+  char_u *get_augroup_name __ARGS((expand_T *xp, int idx));
+  char_u *set_context_in_autocmd __ARGS((expand_T *xp, char_u *arg, int doautocmd));
+*** ../vim-7.1.124/src/window.c	Tue Sep 25 14:50:19 2007
+--- src/window.c	Tue Sep 25 22:05:45 2007
+***************
+*** 1291,1297 ****
+       * Don't execute autocommands while creating the windows.  Must do that
+       * when putting the buffers in the windows.
+       */
+!     ++autocmd_block;
+  #endif
+  
+      /* todo is number of windows left to create */
+--- 1291,1297 ----
+       * Don't execute autocommands while creating the windows.  Must do that
+       * when putting the buffers in the windows.
+       */
+!     block_autocmds();
+  #endif
+  
+      /* todo is number of windows left to create */
+***************
+*** 1313,1319 ****
+  	}
+  
+  #ifdef FEAT_AUTOCMD
+!     --autocmd_block;
+  #endif
+  
+      /* return actual number of windows */
+--- 1313,1319 ----
+  	}
+  
+  #ifdef FEAT_AUTOCMD
+!     unblock_autocmds();
+  #endif
+  
+      /* return actual number of windows */
+***************
+*** 3415,3421 ****
+       * Don't execute autocommands while creating the tab pages.  Must do that
+       * when putting the buffers in the windows.
+       */
+!     ++autocmd_block;
+  #endif
+  
+      for (todo = count - 1; todo > 0; --todo)
+--- 3415,3421 ----
+       * Don't execute autocommands while creating the tab pages.  Must do that
+       * when putting the buffers in the windows.
+       */
+!     block_autocmds();
+  #endif
+  
+      for (todo = count - 1; todo > 0; --todo)
+***************
+*** 3423,3429 ****
+  	    break;
+  
+  #ifdef FEAT_AUTOCMD
+!     --autocmd_block;
+  #endif
+  
+      /* return actual number of tab pages */
+--- 3423,3429 ----
+  	    break;
+  
+  #ifdef FEAT_AUTOCMD
+!     unblock_autocmds();
+  #endif
+  
+      /* return actual number of tab pages */
+***************
+*** 4162,4168 ****
+  	/* Don't execute autocommands while the window is not properly
+  	 * initialized yet.  gui_create_scrollbar() may trigger a FocusGained
+  	 * event. */
+! 	++autocmd_block;
+  #endif
+  	/*
+  	 * link the window in the window list
+--- 4162,4168 ----
+  	/* Don't execute autocommands while the window is not properly
+  	 * initialized yet.  gui_create_scrollbar() may trigger a FocusGained
+  	 * event. */
+! 	block_autocmds();
+  #endif
+  	/*
+  	 * link the window in the window list
+***************
+*** 4207,4213 ****
+  	foldInitWin(newwin);
+  #endif
+  #ifdef FEAT_AUTOCMD
+! 	--autocmd_block;
+  #endif
+  #ifdef FEAT_SEARCH_EXTRA
+  	newwin->w_match_head = NULL;
+--- 4207,4213 ----
+  	foldInitWin(newwin);
+  #endif
+  #ifdef FEAT_AUTOCMD
+! 	unblock_autocmds();
+  #endif
+  #ifdef FEAT_SEARCH_EXTRA
+  	newwin->w_match_head = NULL;
+***************
+*** 4232,4238 ****
+  #ifdef FEAT_AUTOCMD
+      /* Don't execute autocommands while the window is halfway being deleted.
+       * gui_mch_destroy_scrollbar() may trigger a FocusGained event. */
+!     ++autocmd_block;
+  #endif
+  
+  #ifdef FEAT_MZSCHEME
+--- 4232,4238 ----
+  #ifdef FEAT_AUTOCMD
+      /* Don't execute autocommands while the window is halfway being deleted.
+       * gui_mch_destroy_scrollbar() may trigger a FocusGained event. */
+!     block_autocmds();
+  #endif
+  
+  #ifdef FEAT_MZSCHEME
+***************
+*** 4295,4301 ****
+      vim_free(wp);
+  
+  #ifdef FEAT_AUTOCMD
+!     --autocmd_block;
+  #endif
+  }
+  
+--- 4295,4301 ----
+      vim_free(wp);
+  
+  #ifdef FEAT_AUTOCMD
+!     unblock_autocmds();
+  #endif
+  }
+  
+*** ../vim-7.1.124/src/version.c	Sat Sep 29 13:15:29 2007
+--- src/version.c	Sat Sep 29 14:08:31 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     125,
+  /**/
+
+-- 
+MICHAEL PALIN PLAYED: 1ST SOLDIER WITH A KEEN INTEREST IN BIRDS, DENNIS, MR
+                      DUCK (A VILLAGE CARPENTER WHO IS ALMOST KEENER THAN
+                      ANYONE ELSE TO BURN WITCHES), THREE-HEADED KNIGHT, SIR
+                      GALAHAD, KING OF SWAMP CASTLE, BROTHER MAYNARD'S ROOMATE
+                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///




More information about the pkg-vim-maintainers mailing list