0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.0082: when reusing a buffer listeners are not cleared

Problem:    When reusing a buffer listeners are not cleared. (Axel Forsman)
Solution:   Clear listeners when reusing a buffer. (closes #5431)
This commit is contained in:
Bram Moolenaar
2020-01-03 21:00:02 +01:00
parent 467c32bd72
commit f10997a154
3 changed files with 34 additions and 0 deletions

View File

@@ -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