Fix issue where callbacks are garbage collected

Import necessary part of vim-patch:8.1.1575.
75a1a9415b
This commit is contained in:
erw7 2019-09-08 17:33:25 +09:00
parent 3557757a3c
commit d54b5997b7

View File

@ -5152,6 +5152,10 @@ bool garbage_collect(bool testing)
}
// buffer ShaDa additional data
ABORTING(set_ref_dict)(buf->additional_data, copyID);
// buffer callback functions
set_ref_in_callback(&buf->b_prompt_callback, copyID, NULL, NULL);
set_ref_in_callback(&buf->b_prompt_interrupt, copyID, NULL, NULL);
}
FOR_ALL_TAB_WINDOWS(tp, wp) {