]> granicus.if.org Git - vim/commitdiff
patch 8.2.1483: Vim9: error for using special as number v8.2.1483
authorBram Moolenaar <Bram@vim.org>
Tue, 18 Aug 2020 20:50:38 +0000 (22:50 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 18 Aug 2020 20:50:38 +0000 (22:50 +0200)
Problem:    Vim9: error for using special as number when returning "false"
            from a popup filter.
Solution:   Use tv_get_bool(). (closes #6733)

src/popupwin.c
src/version.c

index 4b85fec1932c9807edea619027c59d9c56c57598..053d6d3fd8c61e164eedfe3aae5563cae612a807 100644 (file)
@@ -3154,7 +3154,7 @@ invoke_popup_filter(win_T *wp, int c)
     call_callback(&wp->w_filter_cb, -1, &rettv, 2, argv);
     if (win_valid_popup(wp) && old_lnum != wp->w_cursor.lnum)
        popup_highlight_curline(wp);
-    res = tv_get_number(&rettv);
+    res = tv_get_bool(&rettv);
 
     vim_free(argv[1].vval.v_string);
     clear_tv(&rettv);
index a7fe8d46a9a1f344bca1a40cfc26ea204e90fd3b..028b910a18490dd8f834d7dc2f60371c34071c22 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1483,
 /**/
     1482,
 /**/