0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.1483: Vim9: error for using special as number

Problem:    Vim9: error for using special as number when returning "false"
            from a popup filter.
Solution:   Use tv_get_bool(). (closes #6733)
This commit is contained in:
Bram Moolenaar
2020-08-18 22:50:38 +02:00
parent aeb2bdd0de
commit 165036ddba
2 changed files with 3 additions and 1 deletions

View File

@@ -3154,7 +3154,7 @@ invoke_popup_filter(win_T *wp, int c)
call_callback(&wp->w_filter_cb, -1, &rettv, 2, argv); call_callback(&wp->w_filter_cb, -1, &rettv, 2, argv);
if (win_valid_popup(wp) && old_lnum != wp->w_cursor.lnum) if (win_valid_popup(wp) && old_lnum != wp->w_cursor.lnum)
popup_highlight_curline(wp); popup_highlight_curline(wp);
res = tv_get_number(&rettv); res = tv_get_bool(&rettv);
vim_free(argv[1].vval.v_string); vim_free(argv[1].vval.v_string);
clear_tv(&rettv); clear_tv(&rettv);

View File

@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1483,
/**/ /**/
1482, 1482,
/**/ /**/