From: Bram Moolenaar Date: Fri, 31 Oct 2014 18:51:36 +0000 (+0100) Subject: updated for version 7.4.493 X-Git-Tag: v7.4.493 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=086329d3f6b1182b6817433a1c498e1e746d2a3b;p=vim updated for version 7.4.493 Problem: A TextChanged autocommand is triggered when saving a file. (William Gardner) Solution: Update last_changedtick after calling unchanged(). (Christian Brabandt) --- diff --git a/src/fileio.c b/src/fileio.c index c7e846b82..0843d0429 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -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); } diff --git a/src/version.c b/src/version.c index 69538140c..378818e66 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 493, /**/ 492, /**/