]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1745: tabpanel: not properly redraw after wildmenu v9.1.1745
authorHirohito Higashi <h.east.727@gmail.com>
Tue, 9 Sep 2025 19:11:13 +0000 (15:11 -0400)
committerChristian Brabandt <cb@256bit.org>
Tue, 9 Sep 2025 19:11:13 +0000 (15:11 -0400)
Problem:  tabpanel: not properly redraw after wildmenu
          (ddad431)
Solution: Mark tabpanel to be redrawn (Hirohito Higashi).

fixes: #18209
closes: #18252

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/cmdexpand.c
src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_0.dump [new file with mode: 0644]
src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_1.dump [new file with mode: 0644]
src/testdir/test_tabpanel.vim
src/version.c

index a3a8e467ec05a61fc4b1d5473eefdd2bc0d9b3af..fdfafcbbaff80df4b9c381e7b26ccc7c4944b5e1 100644 (file)
@@ -4501,6 +4501,9 @@ wildmenu_cleanup(cmdline_info_T *cclp UNUSED)
        p_ls = save_p_ls;
        p_wmh = save_p_wmh;
        last_status(FALSE);
+#if defined(FEAT_TABPANEL)
+       redraw_tabpanel = TRUE;
+#endif
        update_screen(UPD_VALID);       // redraw the screen NOW
        redrawcmd();
        save_p_ls = -1;
diff --git a/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_0.dump b/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_0.dump
new file mode 100644 (file)
index 0000000..e665e25
--- /dev/null
@@ -0,0 +1,10 @@
+|[+8#0000001#e0e0e08|N|o| |N|a|m|e|]| @11|[|N|o| |N|a|m|e|]| | +2#0000000#ffffff0|a@2| | +1&&@7|X+8#0000001#e0e0e08
+|a+2#0000000#ffffff0@2| @16> +0&&@24
+| +1&&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +0#0000000&@44
diff --git a/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_1.dump b/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_1.dump
new file mode 100644 (file)
index 0000000..4b61a68
--- /dev/null
@@ -0,0 +1,10 @@
+|[+8#0000001#e0e0e08|N|o| |N|a|m|e|]| @11|[|N|o| |N|a|m|e|]| | +2#0000000#ffffff0|a@2| | +1&&@7|X+8#0000001#e0e0e08
+|a+2#0000000#ffffff0@2| @16| +0&&@24
+| +1&&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+|t+0#0000001#ffff4012|a|b|n|e|w| +3#0000000#ffffff0@1|t|a|b|n|e|x|t| @29
+|:+0&&|t|a|b|n|e|w> @37
index ecc12b59be904c4d3ab7004aa1aa57d96c6988a5..65c7362760ffed8773e82d0ea7ef23f754661044 100644 (file)
@@ -147,6 +147,7 @@ function Test_tabpanel_mouse()
   call feedkeys("\<LeftRelease>", 'xt')
   call assert_equal(3, tabpagenr())
 
+  " Test getmousepos()
   call feedkeys("\<LeftMouse>", 'xt')
   call test_setmouse(2, 3)
   let pos = getmousepos()
@@ -770,4 +771,27 @@ function Test_tabpanel_with_cmdline_pum()
 
   call StopVimInTerminal(buf)
 endfunc
+
+function Test_tabpanel_with_cmdline_no_pum()
+  CheckScreendump
+
+  let lines =<< trim END
+    set showtabpanel=2
+    set noruler
+    tabnew aaa
+    set wildoptions-=pum
+  END
+  call writefile(lines, 'XTest_tabpanel_with_cmdline_pum', 'D')
+
+  let buf = RunVimInTerminal('-S XTest_tabpanel_with_cmdline_pum', {'rows': 10, 'cols': 45})
+  call term_sendkeys(buf, "\<C-L>")
+  call VerifyScreenDump(buf, 'Test_tabpanel_with_cmdline_no_pum_0', {})
+  call term_sendkeys(buf, ":tabne\<Tab>")
+  call VerifyScreenDump(buf, 'Test_tabpanel_with_cmdline_no_pum_1', {})
+  call term_sendkeys(buf, "\<Esc>\<C-L>")
+  call VerifyScreenDump(buf, 'Test_tabpanel_with_cmdline_no_pum_0', {})
+
+  call StopVimInTerminal(buf)
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab
index ca232eef1b8686ec905dce4499d26536d35ad103..46a2bd23214a846ce540d1b4c70b5df475ef166b 100644 (file)
@@ -724,6 +724,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1745,
 /**/
     1744,
 /**/