summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-02-25 14:59:34 +0100
committerBram Moolenaar <Bram@vim.org>2017-02-25 14:59:34 +0100
commit95c526e1f6d76acafee4b21f5701d6d6ac8c4b5f (patch)
treebd5c3b788fbd7995938325c97c3ff4c2d72b9b94 /src/main.c
parentd3f78dc9ebd729475a7f24a50a91112e300d5ac9 (diff)
downloadvim-git-95c526e1f6d76acafee4b21f5701d6d6ac8c4b5f.tar.gz
patch 8.0.0365: might free a dict item that wasn't allocatedv8.0.0365
Problem: Might free a dict item that wasn't allocated. Solution: Call dictitem_free(). (Nikolai Pavlov) Use this for b:changedtick.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index ff173af7e..387221c9d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1162,15 +1162,15 @@ main_loop(
#endif
#ifdef FEAT_AUTOCMD
- /* Trigger TextChanged if b_changedtick differs. */
+ /* Trigger TextChanged if b:changedtick differs. */
if (!finish_op && has_textchanged()
- && last_changedtick != *curbuf->b_changedtick)
+ && last_changedtick != CHANGEDTICK(curbuf))
{
if (last_changedtick_buf == curbuf)
apply_autocmds(EVENT_TEXTCHANGED, NULL, NULL,
FALSE, curbuf);
last_changedtick_buf = curbuf;
- last_changedtick = *curbuf->b_changedtick;
+ last_changedtick = CHANGEDTICK(curbuf);
}
#endif
@@ -1388,11 +1388,11 @@ getout(int exitval)
/* Autocmd must have close the buffer already, skip. */
continue;
buf = wp->w_buffer;
- if (buf->b_ct_val != -1)
+ if (CHANGEDTICK(buf) != -1)
{
apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname,
buf->b_fname, FALSE, buf);
- buf->b_ct_val = -1; /* note that we did it already */
+ CHANGEDTICK(buf) = -1; /* note that we did it already */
/* start all over, autocommands may mess up the lists */
next_tp = first_tabpage;
break;