comparison src/popupwin.c @ 25368:1ffa8eb30353 v8.2.3221

patch 8.2.3221: Vim9: argument types are not checked at compile time Commit: https://github.com/vim/vim/commit/a764e73d4ffc5d046807c757eaacb9b0a5408152 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sun Jul 25 15:57:32 2021 +0200 patch 8.2.3221: Vim9: argument types are not checked at compile time Problem: Vim9: argument types are not checked at compile time. Solution: Add several more type checks. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/8632)
author Bram Moolenaar <Bram@vim.org>
date Sun, 25 Jul 2021 16:00:05 +0200
parents e2be9f3c5907
children e8e2c4d33b9b
comparison
equal deleted inserted replaced
25367:90ed0a369ac3 25368:1ffa8eb30353
2514 * popup_close({id}) 2514 * popup_close({id})
2515 */ 2515 */
2516 void 2516 void
2517 f_popup_close(typval_T *argvars, typval_T *rettv UNUSED) 2517 f_popup_close(typval_T *argvars, typval_T *rettv UNUSED)
2518 { 2518 {
2519 int id = (int)tv_get_number(argvars); 2519 int id;
2520 win_T *wp; 2520 win_T *wp;
2521 2521
2522 if (in_vim9script() && check_for_number_arg(argvars, 0) == FAIL)
2523 return;
2524
2525 id = (int)tv_get_number(argvars);
2522 if ( 2526 if (
2523 # ifdef FEAT_TERMINAL 2527 # ifdef FEAT_TERMINAL
2524 // if the popup contains a terminal it will become hidden 2528 // if the popup contains a terminal it will become hidden
2525 curbuf->b_term == NULL && 2529 curbuf->b_term == NULL &&
2526 # endif 2530 # endif