Mercurial > vim
changeset 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 | 349859948450 |
children | ca21a4cb5081 |
files | src/popupwin.c src/version.c |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/popupwin.c +++ b/src/popupwin.c @@ -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);