mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
vim-patch:7.4.493
Problem: A TextChanged autocommand is triggered when saving a file. (William Gardner) Solution: Update last_changedtick after calling unchanged(). (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-493
This commit is contained in:
@@ -3583,6 +3583,12 @@ restore_backup:
|
|||||||
&& (overwriting || vim_strchr(p_cpo, CPO_PLUS) != NULL)
|
&& (overwriting || vim_strchr(p_cpo, CPO_PLUS) != NULL)
|
||||||
) {
|
) {
|
||||||
unchanged(buf, TRUE);
|
unchanged(buf, TRUE);
|
||||||
|
/* 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;
|
||||||
|
}
|
||||||
u_unchanged(buf);
|
u_unchanged(buf);
|
||||||
u_update_save_nr(buf);
|
u_update_save_nr(buf);
|
||||||
}
|
}
|
||||||
|
@@ -245,7 +245,7 @@ static int included_patches[] = {
|
|||||||
//496 NA
|
//496 NA
|
||||||
//495 NA
|
//495 NA
|
||||||
494,
|
494,
|
||||||
//493,
|
493,
|
||||||
//492,
|
//492,
|
||||||
//491,
|
//491,
|
||||||
//490,
|
//490,
|
||||||
|
Reference in New Issue
Block a user