diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-07-25 15:57:32 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-25 15:57:32 +0200 |
commit | a764e73d4ffc5d046807c757eaacb9b0a5408152 (patch) | |
tree | 477a5065575e437a5496ead0e45ac8ff5ee5671c /src/popupwin.c | |
parent | 2ec28aec9d4f1b9c1c008e36adde9fc82affae0f (diff) |
patch 8.2.3221: Vim9: argument types are not checked at compile timev8.2.3221
Problem: Vim9: argument types are not checked at compile time.
Solution: Add several more type checks. (Yegappan Lakshmanan, closes #8632)
Diffstat (limited to 'src/popupwin.c')
-rw-r--r-- | src/popupwin.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/popupwin.c b/src/popupwin.c index f433b875a9..97c8fe5c23 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -2516,9 +2516,13 @@ find_popup_win(int id) void f_popup_close(typval_T *argvars, typval_T *rettv UNUSED) { - int id = (int)tv_get_number(argvars); + int id; win_T *wp; + if (in_vim9script() && check_for_number_arg(argvars, 0) == FAIL) + return; + + id = (int)tv_get_number(argvars); if ( # ifdef FEAT_TERMINAL // if the popup contains a terminal it will become hidden |