summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-02 22:33:24 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-02 22:33:24 +0200
commit62f93f4ec9db1deca088bab7783a35306e2ed4cb (patch)
treede48e03e455e040ffe6d234413b509a63c22581c
parent04d594b9c14299ed50da0774fb8d3a10fbc4076f (diff)
downloadvim-git-62f93f4ec9db1deca088bab7783a35306e2ed4cb.tar.gz
patch 8.2.1578: Vim9: popup_clear() does not take "true" as argumentv8.2.1578
Problem: Vim9: popup_clear() does not take "true" as argument. Solution: Use tv_get_bool(). (closes #6826)
-rw-r--r--src/popupwin.c2
-rw-r--r--src/testdir/test_popupwin.vim17
-rw-r--r--src/version.c2
3 files changed, 13 insertions, 8 deletions
diff --git a/src/popupwin.c b/src/popupwin.c
index 053d6d3fd..953e76cc7 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -2125,7 +2125,7 @@ f_popup_clear(typval_T *argvars, typval_T *rettv UNUSED)
int force = FALSE;
if (argvars[0].v_type != VAR_UNKNOWN)
- force = (int)tv_get_number(&argvars[0]);
+ force = (int)tv_get_bool(&argvars[0]);
close_all_popups(force);
}
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 1aebe058f..9e35c7ffc 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -2559,20 +2559,23 @@ endfunc
func Test_popupwin_close_prevwin()
CheckFeature terminal
+ call Popupwin_close_prevwin()
+endfunc
- call assert_equal(1, winnr('$'))
+def Popupwin_close_prevwin()
+ assert_equal(1, winnr('$'))
split
wincmd b
- call assert_equal(2, winnr())
+ assert_equal(2, winnr())
let buf = term_start(&shell, #{hidden: 1})
- call popup_create(buf, {})
- call TermWait(buf, 100)
- call popup_clear(1)
- call assert_equal(2, winnr())
+ popup_create(buf, {})
+ TermWait(buf, 100)
+ popup_clear(true)
+ assert_equal(2, winnr())
quit
exe 'bwipe! ' .. buf
-endfunc
+enddef
func Test_popupwin_with_buffer_and_filter()
new Xwithfilter
diff --git a/src/version.c b/src/version.c
index 5232e8485..12d49bbcf 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1578,
+/**/
1577,
/**/
1576,