Skip to content

Commit 95593fa

Browse files
h-eastchrisbra
authored andcommitted
patch 9.1.1745: tabpanel: not properly redraw after wildmenu
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>
1 parent 77cfc49 commit 95593fa

File tree

5 files changed

+49
-0
lines changed

5 files changed

+49
-0
lines changed

src/cmdexpand.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4501,6 +4501,9 @@ wildmenu_cleanup(cmdline_info_T *cclp UNUSED)
45014501
p_ls = save_p_ls;
45024502
p_wmh = save_p_wmh;
45034503
last_status(FALSE);
4504+
#if defined(FEAT_TABPANEL)
4505+
redraw_tabpanel = TRUE;
4506+
#endif
45044507
update_screen(UPD_VALID); // redraw the screen NOW
45054508
redrawcmd();
45064509
save_p_ls = -1;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
|[+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
2+
|a+2#0000000#ffffff0@2| @16> +0&&@24
3+
| +1&&@19|~+0#4040ff13&| @23
4+
| +1#0000000&@19|~+0#4040ff13&| @23
5+
| +1#0000000&@19|~+0#4040ff13&| @23
6+
| +1#0000000&@19|~+0#4040ff13&| @23
7+
| +1#0000000&@19|~+0#4040ff13&| @23
8+
| +1#0000000&@19|~+0#4040ff13&| @23
9+
| +1#0000000&@19|~+0#4040ff13&| @23
10+
| +0#0000000&@44
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
|[+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
2+
|a+2#0000000#ffffff0@2| @16| +0&&@24
3+
| +1&&@19|~+0#4040ff13&| @23
4+
| +1#0000000&@19|~+0#4040ff13&| @23
5+
| +1#0000000&@19|~+0#4040ff13&| @23
6+
| +1#0000000&@19|~+0#4040ff13&| @23
7+
| +1#0000000&@19|~+0#4040ff13&| @23
8+
| +1#0000000&@19|~+0#4040ff13&| @23
9+
|t+0#0000001#ffff4012|a|b|n|e|w| +3#0000000#ffffff0@1|t|a|b|n|e|x|t| @29
10+
|:+0&&|t|a|b|n|e|w> @37

src/testdir/test_tabpanel.vim

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ function Test_tabpanel_mouse()
147147
call feedkeys("\<LeftRelease>", 'xt')
148148
call assert_equal(3, tabpagenr())
149149

150+
" Test getmousepos()
150151
call feedkeys("\<LeftMouse>", 'xt')
151152
call test_setmouse(2, 3)
152153
let pos = getmousepos()
@@ -770,4 +771,27 @@ function Test_tabpanel_with_cmdline_pum()
770771

771772
call StopVimInTerminal(buf)
772773
endfunc
774+
775+
function Test_tabpanel_with_cmdline_no_pum()
776+
CheckScreendump
777+
778+
let lines =<< trim END
779+
set showtabpanel=2
780+
set noruler
781+
tabnew aaa
782+
set wildoptions-=pum
783+
END
784+
call writefile(lines, 'XTest_tabpanel_with_cmdline_pum', 'D')
785+
786+
let buf = RunVimInTerminal('-S XTest_tabpanel_with_cmdline_pum', {'rows': 10, 'cols': 45})
787+
call term_sendkeys(buf, "\<C-L>")
788+
call VerifyScreenDump(buf, 'Test_tabpanel_with_cmdline_no_pum_0', {})
789+
call term_sendkeys(buf, ":tabne\<Tab>")
790+
call VerifyScreenDump(buf, 'Test_tabpanel_with_cmdline_no_pum_1', {})
791+
call term_sendkeys(buf, "\<Esc>\<C-L>")
792+
call VerifyScreenDump(buf, 'Test_tabpanel_with_cmdline_no_pum_0', {})
793+
794+
call StopVimInTerminal(buf)
795+
endfunc
796+
773797
" vim: shiftwidth=2 sts=2 expandtab

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,8 @@ static char *(features[]) =
724724

725725
static int included_patches[] =
726726
{ /* Add new patch number below this line */
727+
/**/
728+
1745,
727729
/**/
728730
1744,
729731
/**/

0 commit comments

Comments
 (0)