comparison src/popupwin.c @ 21867:76627c726349 v8.2.1483

patch 8.2.1483: Vim9: error for using special as number Commit: https://github.com/vim/vim/commit/165036ddba1318576a29f75d82fae8c326a48f18 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 18 22:50:38 2020 +0200 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)
author Bram Moolenaar <Bram@vim.org>
date Tue, 18 Aug 2020 23:00:04 +0200
parents 1f6dc5b953c4
children f64a16f5bff0
comparison
equal deleted inserted replaced
21866:349859948450 21867:76627c726349
3152 3152
3153 // NOTE: The callback might close the popup and make "wp" invalid. 3153 // NOTE: The callback might close the popup and make "wp" invalid.
3154 call_callback(&wp->w_filter_cb, -1, &rettv, 2, argv); 3154 call_callback(&wp->w_filter_cb, -1, &rettv, 2, argv);
3155 if (win_valid_popup(wp) && old_lnum != wp->w_cursor.lnum) 3155 if (win_valid_popup(wp) && old_lnum != wp->w_cursor.lnum)
3156 popup_highlight_curline(wp); 3156 popup_highlight_curline(wp);
3157 res = tv_get_number(&rettv); 3157 res = tv_get_bool(&rettv);
3158 3158
3159 vim_free(argv[1].vval.v_string); 3159 vim_free(argv[1].vval.v_string);
3160 clear_tv(&rettv); 3160 clear_tv(&rettv);
3161 return res; 3161 return res;
3162 } 3162 }