]> granicus.if.org Git - vim/commitdiff
patch 8.1.1997: no redraw after a popup window filter is invoked v8.1.1997
authorBram Moolenaar <Bram@vim.org>
Sat, 7 Sep 2019 12:06:52 +0000 (14:06 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 7 Sep 2019 12:06:52 +0000 (14:06 +0200)
Problem:    No redraw after a popup window filter is invoked.
Solution:   Redraw if needed.

src/popupwin.c
src/testdir/dumps/Test_popupwin_menu_filter_5.dump [new file with mode: 0644]
src/testdir/test_popupwin.vim
src/version.c

index 226232dd0ec18c005bb59d81a6df6ce2c5082e1c..1fb72bbdb571b30b1929bbd505c22df109d3146e 100644 (file)
@@ -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 (file)
index 0000000..910e224
--- /dev/null
@@ -0,0 +1,10 @@
+| +0&#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|:+0#0000000&> @73
index e6b4137cdea5bc287bfcd5b534542e1ea84cee56..cbfc7d2d7f3930b42ea639398a01bd318f2a075d 100644 (file)
@@ -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)
index 9610b1aaae6f3579578ef7975e6ca1eba5b2e553..d933bffa2dd6bc997f440acdb8105084f168aeb4 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1997,
 /**/
     1996,
 /**/