aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/tag.c')
-rw-r--r--src/nvim/tag.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c
index d57bbead63..9ea0b71dc1 100644
--- a/src/nvim/tag.c
+++ b/src/nvim/tag.c
@@ -149,6 +149,13 @@ void free_tagfunc_option(void)
}
#endif
+/// Mark the global 'tagfunc' callback with "copyID" so that it is not garbage
+/// collected.
+bool set_ref_in_tagfunc(int copyID)
+{
+ return set_ref_in_callback(&tfu_cb, copyID, NULL, NULL);
+}
+
/// Copy the global 'tagfunc' callback function to the buffer-local 'tagfunc'
/// callback for 'buf'.
void set_buflocal_tfu_callback(buf_T *buf)