summaryrefslogtreecommitdiffstats
path: root/src/change.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2021-07-24 21:33:26 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-24 21:33:26 +0200
commit5bca906b307728fa74a112914dc55b424d512d39 (patch)
tree46c144eecea8b23bf66138a46029afa6f275bf85 /src/change.c
parent7d60384a00755e5c0112cebeb5e232fc133c9eca (diff)
patch 8.2.3215: Vim9: argument types are not checked at compile timev8.2.3215
Problem: Vim9: argument types are not checked at compile time. Solution: Add several more type checks. Sort the argument lists. (Yegappan Lakshmanan, closes #8626)
Diffstat (limited to 'src/change.c')
-rw-r--r--src/change.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/change.c b/src/change.c
index 73ea64ff19..ee1bd6fca8 100644
--- a/src/change.c
+++ b/src/change.c
@@ -241,6 +241,9 @@ f_listener_add(typval_T *argvars, typval_T *rettv)
listener_T *lnr;
buf_T *buf = curbuf;
+ if (in_vim9script() && check_for_opt_buffer_arg(argvars, 1) == FAIL)
+ return;
+
callback = get_callback(&argvars[0]);
if (callback.cb_name == NULL)
return;