mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user