diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-07-24 16:16:15 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-24 16:16:15 +0200 |
commit | 7973de35ba6840b7e106e2e8a8912522e9a2a960 (patch) | |
tree | 8e8a1848f52a82af0a31111a0846c319a9544dd7 /src/job.c | |
parent | dd0b287c1ec8314034a2dbb14c4267994c47520c (diff) |
patch 8.2.3211: Vim9: argument types are not checked at compile timev8.2.3211
Problem: Vim9: argument types are not checked at compile time.
Solution: Add several more type checks. Fix type check for matchaddpos().
(Yegappan Lakshmanan, closes #8619)
Diffstat (limited to 'src/job.c')
-rw-r--r-- | src/job.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1658,6 +1658,10 @@ f_prompt_setcallback(typval_T *argvars, typval_T *rettv UNUSED) if (check_secure()) return; + + if (in_vim9script() && check_for_buffer_arg(argvars, 0) == FAIL) + return; + buf = tv_get_buf(&argvars[0], FALSE); if (buf == NULL) return; @@ -1681,6 +1685,10 @@ f_prompt_setinterrupt(typval_T *argvars, typval_T *rettv UNUSED) if (check_secure()) return; + + if (in_vim9script() && check_for_buffer_arg(argvars, 0) == FAIL) + return; + buf = tv_get_buf(&argvars[0], FALSE); if (buf == NULL) return; |