summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-03 21:00:02 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-03 21:00:02 +0100
commitf10997a1543eb0724d882da3678bacd44e647141 (patch)
tree24e970f79ff00a9b0e2d17a7f24ba9d8031837ea /src/buffer.c
parent467c32bd72efea09677f173fef7a3465d9ab7826 (diff)
patch 8.2.0082: when reusing a buffer listeners are not clearedv8.2.0082
Problem: When reusing a buffer listeners are not cleared. (Axel Forsman) Solution: Clear listeners when reusing a buffer. (closes #5431)
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index eb6b287728..0a68d484e5 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -979,6 +979,7 @@ free_buffer_stuff(
hash_init(&buf->b_vars->dv_hashtab);
init_changedtick(buf);
CHANGEDTICK(buf) = tick;
+ remove_listeners(buf);
}
#endif
uc_clear(&buf->b_ucmds); // clear local user commands