aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-07 14:49:53 +0800
committerGitHub <noreply@github.com>2022-11-07 14:49:53 +0800
commite9c1cb71f8a4d6d7818dcb5f71ac78bee431309a (patch)
tree0ae5f982feae83a659b83e8a9272a3cab778252b /src/nvim/ops.c
parentb042f6d9022a4c734477f1fdbc92b4f8134661b3 (diff)
parent2ed2c04aa518fb2591497e9a5ebe9cc32d8894a8 (diff)
downloadrneovim-e9c1cb71f8a4d6d7818dcb5f71ac78bee431309a.tar.gz
rneovim-e9c1cb71f8a4d6d7818dcb5f71ac78bee431309a.tar.bz2
rneovim-e9c1cb71f8a4d6d7818dcb5f71ac78bee431309a.zip
Merge pull request #20987 from zeertzjq/vim-8.2.3751
vim-patch:8.2.{3735,3751,3756,3758,3788,3792}
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 2d53918ded..65fc42bc08 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -5606,6 +5606,13 @@ void free_operatorfunc_option(void)
}
#endif
+/// Mark the global 'operatorfunc' callback with "copyID" so that it is not
+/// garbage collected.
+bool set_ref_in_opfunc(int copyID)
+{
+ return set_ref_in_callback(&opfunc_cb, copyID, NULL, NULL);
+}
+
/// Handle the "g@" operator: call 'operatorfunc'.
static void op_function(const oparg_T *oap)
FUNC_ATTR_NONNULL_ALL