mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 06:48:17 +00:00
vim-patch:8.0.1193: crash when wiping buffer after getbufinfo()
Problem: Crash when wiping out a buffer after using getbufinfo(). (Yegappan Lakshmanan) Solution: Remove b:changedtick from the buffer variables. (Note: The test changes in vim-patch:8.0.1193 were already included.)
This commit is contained in:
@@ -757,6 +757,8 @@ static void free_buffer(buf_T *buf)
|
|||||||
handle_unregister_buffer(buf);
|
handle_unregister_buffer(buf);
|
||||||
buf_free_count++;
|
buf_free_count++;
|
||||||
free_buffer_stuff(buf, true);
|
free_buffer_stuff(buf, true);
|
||||||
|
// b:changedtick uses an item in buf_T, remove it now.
|
||||||
|
tv_dict_item_remove(buf->b_vars, (dictitem_T *)&buf->changedtick_di);
|
||||||
unref_var_dict(buf->b_vars);
|
unref_var_dict(buf->b_vars);
|
||||||
aubuflocal_remove(buf);
|
aubuflocal_remove(buf);
|
||||||
tv_dict_unref(buf->additional_data);
|
tv_dict_unref(buf->additional_data);
|
||||||
|
@@ -508,9 +508,9 @@ struct file_buffer {
|
|||||||
int b_changed; // 'modified': Set to true if something in the
|
int b_changed; // 'modified': Set to true if something in the
|
||||||
// file has been changed and not written out.
|
// file has been changed and not written out.
|
||||||
|
|
||||||
/// Change identifier incremented for each change, including undo
|
/// Change-identifier incremented for each change, including undo.
|
||||||
///
|
///
|
||||||
/// This is a dictionary item used to store in b:changedtick.
|
/// This is a dictionary item used to store b:changedtick.
|
||||||
ChangedtickDictItem changedtick_di;
|
ChangedtickDictItem changedtick_di;
|
||||||
|
|
||||||
varnumber_T b_last_changedtick; // b:changedtick when TextChanged or
|
varnumber_T b_last_changedtick; // b:changedtick when TextChanged or
|
||||||
|
Reference in New Issue
Block a user