Karsten Hopp 82742c
To: vim_dev@googlegroups.com
Karsten Hopp 82742c
Subject: Patch 7.4.493
Karsten Hopp 82742c
Fcc: outbox
Karsten Hopp 82742c
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 82742c
Mime-Version: 1.0
Karsten Hopp 82742c
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 82742c
Content-Transfer-Encoding: 8bit
Karsten Hopp 82742c
------------
Karsten Hopp 82742c
Karsten Hopp 82742c
Patch 7.4.493
Karsten Hopp 82742c
Problem:    A TextChanged autocommand is triggered when saving a file.
Karsten Hopp 82742c
	    (William Gardner)
Karsten Hopp 82742c
Solution:   Update last_changedtick after calling unchanged(). (Christian
Karsten Hopp 82742c
	    Brabandt)
Karsten Hopp 82742c
Files:	    src/fileio.c
Karsten Hopp 82742c
Karsten Hopp 82742c
Karsten Hopp 82742c
*** ../vim-7.4.492/src/fileio.c	2014-09-23 15:45:04.870801055 +0200
Karsten Hopp 82742c
--- src/fileio.c	2014-10-31 19:48:35.030702344 +0100
Karsten Hopp 82742c
***************
Karsten Hopp 82742c
*** 4877,4882 ****
Karsten Hopp 82742c
--- 4877,4889 ----
Karsten Hopp 82742c
  	    )
Karsten Hopp 82742c
      {
Karsten Hopp 82742c
  	unchanged(buf, TRUE);
Karsten Hopp 82742c
+ #ifdef FEAT_AUTOCMD
Karsten Hopp 82742c
+ 	/* buf->b_changedtick is always incremented in unchanged() but that
Karsten Hopp 82742c
+ 	 * should not trigger a TextChanged event. */
Karsten Hopp 82742c
+ 	if (last_changedtick + 1 == buf->b_changedtick
Karsten Hopp 82742c
+ 					       && last_changedtick_buf == buf)
Karsten Hopp 82742c
+ 	    last_changedtick = buf->b_changedtick;
Karsten Hopp 82742c
+ #endif
Karsten Hopp 82742c
  	u_unchanged(buf);
Karsten Hopp 82742c
  	u_update_save_nr(buf);
Karsten Hopp 82742c
      }
Karsten Hopp 82742c
*** ../vim-7.4.492/src/version.c	2014-10-31 19:20:30.782742928 +0100
Karsten Hopp 82742c
--- src/version.c	2014-10-31 19:48:53.590701897 +0100
Karsten Hopp 82742c
***************
Karsten Hopp 82742c
*** 743,744 ****
Karsten Hopp 82742c
--- 743,746 ----
Karsten Hopp 82742c
  {   /* Add new patch number below this line */
Karsten Hopp 82742c
+ /**/
Karsten Hopp 82742c
+     493,
Karsten Hopp 82742c
  /**/
Karsten Hopp 82742c
Karsten Hopp 82742c
-- 
Karsten Hopp 82742c
You know you use Vim too much when you have this alias in your
Karsten Hopp 82742c
~/.bashrc file: alias :e=/bin/vim             (Eljay Love-Jensen)
Karsten Hopp 82742c
Karsten Hopp 82742c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 82742c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 82742c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 82742c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///