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

patch 8.0.0334: can't access b:changedtick from a dict reference

Problem:    Can't access b:changedtick from a dict reference.
Solution:   Make changedtick a member of the b: dict. (inspired by neovim
            #6112)
This commit is contained in:
Bram Moolenaar
2017-02-17 16:31:35 +01:00
parent 226c534291
commit 79518e2ace
20 changed files with 200 additions and 178 deletions

View File

@@ -1164,13 +1164,13 @@ main_loop(
#ifdef FEAT_AUTOCMD
/* Trigger TextChanged if b_changedtick differs. */
if (!finish_op && has_textchanged()
&& last_changedtick != curbuf->b_changedtick)
&& last_changedtick != *curbuf->b_changedtick)
{
if (last_changedtick_buf == curbuf)
apply_autocmds(EVENT_TEXTCHANGED, NULL, NULL,
FALSE, curbuf);
last_changedtick_buf = curbuf;
last_changedtick = curbuf->b_changedtick;
last_changedtick = *curbuf->b_changedtick;
}
#endif
@@ -1388,11 +1388,11 @@ getout(int exitval)
/* Autocmd must have close the buffer already, skip. */
continue;
buf = wp->w_buffer;
if (buf->b_changedtick != -1)
if (buf->b_ct_val != -1)
{
apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname,
buf->b_fname, FALSE, buf);
buf->b_changedtick = -1; /* note that we did it already */
buf->b_ct_val = -1; /* note that we did it already */
/* start all over, autocommands may mess up the lists */
next_tp = first_tabpage;
break;