0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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)
This commit is contained in:
Bram Moolenaar
2014-10-31 19:51:36 +01:00
parent 2f31e39978
commit 086329d3f6
2 changed files with 9 additions and 0 deletions

View 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);
}

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
493,
/**/
492,
/**/