patch 9.1.1461: tabpanel: tabpanel vanishes with popup menu
Problem: tabpanel: tabpanel vanishes with popup menu
Solution: remove pum-related test in tabpanel_leftcol(), refactor a few
related functions (Hirohito Higashi)
This commit does the following:
- Delete unnecessary pum-related checks in the tabpanel_leftcol()
function
- remove pum-related check in tabpanel_leftcol()
- The argument of the TPL_LCOL() macro has been deleted.
- The argument of the tabpanel_leftcol() function has been changed
to void
- The return type of the `win_comp_pos()` function has been changed to
void
closes: #17549
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_0.dump b/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_0.dump
new file mode 100644
index 0000000..e665e25
--- /dev/null
+++ b/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_0.dump
@@ -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_pum_1.dump b/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_1.dump
new file mode 100644
index 0000000..0e60b9c
--- /dev/null
+++ b/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_1.dump
@@ -0,0 +1,10 @@
+|[+8#0000001#e0e0e08|N|o| |N|a|m|e|]| @12|N|a|m|e|]| @1|a@2| | +2#0000000#ffffff0|b@2| | +1&&@5|X+8#0000001#e0e0e08
+|a@2| @16| +0#0000000#ffffff0@24
+|b+2&&@2| @16|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +1#0000000&@19|~+0#4040ff13&| @23
+| +0#0000001#e0e0e08|s|e|t| @11| +1#0000000#ffffff0@3|~+0#4040ff13&| @23
+| +0#0000001#ffd7ff255|s|e|t|f|i|l|e|t|y|p|e| @3| +1#0000000#ffffff0@3|~+0#4040ff13&| @23
+| +0#0000001#ffd7ff255|s|e|t|g|l|o|b|a|l| @5| +1#0000000#ffffff0@3|~+0#4040ff13&| @23
+| +0#0000001#ffd7ff255|s|e|t|l|o|c|a|l| @6| +1#0000000#ffffff0@3|~+0#4040ff13&| @23
+|:+0#0000000&|s|e|t> @40
diff --git a/src/testdir/test_tabpanel.vim b/src/testdir/test_tabpanel.vim
index 0d79650..1790fee 100644
--- a/src/testdir/test_tabpanel.vim
+++ b/src/testdir/test_tabpanel.vim
@@ -693,4 +693,31 @@
call StopVimInTerminal(buf)
endfunc
+
+function Test_tabpanel_with_cmdline_pum()
+ CheckScreendump
+
+ let lines =<< trim END
+ set showtabpanel=2
+ set noruler
+ tabnew aaa
+ set wildoptions+=pum
+ func TimerCb(timer)
+ tabnew bbb
+ endfunc
+ call timer_start(100, 'TimerCb')
+ 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_pum_0', {})
+ call term_sendkeys(buf, ":set\<Tab>")
+ call term_wait(buf, 120)
+ call VerifyScreenDump(buf, 'Test_tabpanel_with_cmdline_pum_1', {})
+ call term_sendkeys(buf, "\<Esc>:tabclose\<CR>\<C-L>")
+ call VerifyScreenDump(buf, 'Test_tabpanel_with_cmdline_pum_0', {})
+
+ call StopVimInTerminal(buf)
+endfunc
" vim: shiftwidth=2 sts=2 expandtab