summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-09-07 14:06:52 +0200
committerBram Moolenaar <Bram@vim.org>2019-09-07 14:06:52 +0200
commitbcb4c8f9058c17dead61a0a384cb1e09c5fc459b (patch)
tree0dad811b7f4460a0a1a288ba7a240bc8c2350625
parentaad222c9c9a1e4fe6ae5a1fe95bb084619be0e65 (diff)
downloadvim-git-bcb4c8f9058c17dead61a0a384cb1e09c5fc459b.tar.gz
patch 8.1.1997: no redraw after a popup window filter is invokedv8.1.1997
Problem: No redraw after a popup window filter is invoked. Solution: Redraw if needed.
-rw-r--r--src/popupwin.c2
-rw-r--r--src/testdir/dumps/Test_popupwin_menu_filter_5.dump10
-rw-r--r--src/testdir/test_popupwin.vim9
-rw-r--r--src/version.c2
4 files changed, 20 insertions, 3 deletions
diff --git a/src/popupwin.c b/src/popupwin.c
index 226232dd0..1fb72bbdb 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -2802,6 +2802,8 @@ popup_do_filter(int c)
&& (wp->w_filter_mode & state) != 0)
res = invoke_popup_filter(wp, c);
+ if (must_redraw)
+ redraw_after_callback(FALSE);
recursive = FALSE;
KeyTyped = save_KeyTyped;
return res;
diff --git a/src/testdir/dumps/Test_popupwin_menu_filter_5.dump b/src/testdir/dumps/Test_popupwin_menu_filter_5.dump
new file mode 100644
index 000000000..910e224a0
--- /dev/null
+++ b/src/testdir/dumps/Test_popupwin_menu_filter_5.dump
@@ -0,0 +1,10 @@
+| +0&#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|:+0#0000000&> @73
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index e6b4137cd..cbfc7d2d7 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -2159,9 +2159,9 @@ func Test_popup_menu_filter()
call win_execute(a:winid, "call setpos('.', [0, line('.') - 1, 1, 0])")
return 1
endif
- if a:key == 'x'
+ if a:key == ':'
call popup_close(a:winid)
- return 1
+ return 0
endif
return 0
endfunction
@@ -2185,7 +2185,10 @@ func Test_popup_menu_filter()
call term_sendkeys(buf, "0")
call VerifyScreenDump(buf, 'Test_popupwin_menu_filter_4', {})
- call term_sendkeys(buf, "x")
+ " check that when the popup is closed in the filter the screen is redrawn
+ call term_sendkeys(buf, ":")
+ call VerifyScreenDump(buf, 'Test_popupwin_menu_filter_5', {})
+ call term_sendkeys(buf, "\<CR>")
" clean up
call StopVimInTerminal(buf)
diff --git a/src/version.c b/src/version.c
index 9610b1aaa..d933bffa2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1997,
+/**/
1996,
/**/
1995,