summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-20 03:45:36 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-20 03:45:36 +0200
commit75a1a9415b9c207de5a29b25c0d1949c6c9c5c61 (patch)
tree470a0887aed4e52e342edbca555e0bec1b85af99 /src/eval.c
parenta3fce62c911c204ae144b55018f6dc9295088850 (diff)
patch 8.1.1575: callbacks may be garbage collectedv8.1.1575
Problem: Callbacks may be garbage collected. Solution: Set reference in callbacks. (Ozaki Kiichi, closes #4564)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 43866e657e..085e7d7e9a 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -5678,6 +5678,9 @@ garbage_collect(int testing)
/* v: vars */
abort = abort || set_ref_in_ht(&vimvarht, copyID, NULL);
+ // callbacks in buffers
+ abort = abort || set_ref_in_buffers(copyID);
+
#ifdef FEAT_LUA
abort = abort || set_ref_in_lua(copyID);
#endif
@@ -5710,6 +5713,10 @@ garbage_collect(int testing)
abort = abort || set_ref_in_term(copyID);
#endif
+#ifdef FEAT_TEXT_PROP
+ abort = abort || set_ref_in_popups(copyID);
+#endif
+
if (!abort)
{
/*