]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.493 v7.4.493
authorBram Moolenaar <Bram@vim.org>
Fri, 31 Oct 2014 18:51:36 +0000 (19:51 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 31 Oct 2014 18:51:36 +0000 (19:51 +0100)
Problem:    A TextChanged autocommand is triggered when saving a file.
            (William Gardner)
Solution:   Update last_changedtick after calling unchanged(). (Christian
            Brabandt)

src/fileio.c
src/version.c

index c7e846b82ade47e8f1ae9b2876ee7a197c0ed188..0843d042961432561d96089046a0fc0f5ff13b1b 100644 (file)
@@ -4877,6 +4877,13 @@ restore_backup:
            )
     {
        unchanged(buf, TRUE);
+#ifdef FEAT_AUTOCMD
+       /* buf->b_changedtick is always incremented in unchanged() but that
+        * should not trigger a TextChanged event. */
+       if (last_changedtick + 1 == buf->b_changedtick
+                                              && last_changedtick_buf == buf)
+           last_changedtick = buf->b_changedtick;
+#endif
        u_unchanged(buf);
        u_update_save_nr(buf);
     }
index 69538140c17dc60a201d864780a0cb9b58b6c032..378818e66d69a94136f2ea5505574ae41459d047 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    493,
 /**/
     492,
 /**/