[vim/vim] tabpanel: did not properly cleanup the overlapping areas with the wildmenu(no pum) completion row (Issue #18209)

24 views
Skip to first unread message

ddad431

unread,
Sep 5, 2025, 8:58:06 AM (5 days ago) Sep 5
to vim/vim, Subscribed
ddad431 created an issue (vim/vim#18209)

Steps to reproduce

Reproduce

1. Shell
vi -Nu NONE --cmd 'set stpl=2' +'hi TabPanelFill guibg=NONE' +'lang en'

2. Vim
:tabn<Tab><Esc>			" no cleanup
:tabn<Tab><Space> 		" no cleanup
:tabn<Tab> -> :tabnext<CR> 	" no cleanup
:tabn<Tab> -> :tabnew<CR> 	" cleanup

Video

https://github.com/user-attachments/assets/7e848986-42a3-4871-bc95-a5ed90d6154e

Expected behaviour

Correctly cleanup the overlapping areas with the wildmenu(no pum) completion row.

Version of Vim

v9.1.1732

Environment

OS: Windows 11 24H2 26100.5074
Terminal: Windows terminal 1.1824013001
$TERM:
Shell: PowerShell 7.5.2

Logs and stack traces


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209@github.com>

h_east

unread,
Sep 7, 2025, 9:09:58 AM (3 days ago) Sep 7
to vim/vim, Subscribed
h-east left a comment (vim/vim#18209)

I think it's not appropriate to display the status line menu within the tabpanel area (I think this is debatable).
The above approach will result in the following display:

image.png (view on web)
:set tabpanelopt=align:right,vert
:a<Tab>
image.png (view on web)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3263765584@github.com>

h_east

unread,
Sep 7, 2025, 9:17:08 AM (3 days ago) Sep 7
to vim/vim, Subscribed
h-east left a comment (vim/vim#18209)

This is a patch that changes the behavior above.

patch
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index a3a8e467e..4e64b93f8 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -611,9 +611,9 @@ win_redr_status_matches(
 	return;
 
     if (has_mbyte)
-	buf = alloc(Columns * MB_MAXBYTES + 1);
+	buf = alloc(topframe->fr_width * MB_MAXBYTES + 1);
     else
-	buf = alloc(Columns + 1);
+	buf = alloc(topframe->fr_width + 1);
     if (buf == NULL)
 	return;
 
@@ -640,7 +640,7 @@ win_redr_status_matches(
 	if (first_match > 0)
 	    clen += 2;
 	// jumping right, put match at the left
-	if ((long)clen > Columns)
+	if (clen > topframe->fr_width)
 	{
 	    first_match = match;
 	    // if showing the last match, we can add some on the left
@@ -648,7 +648,7 @@ win_redr_status_matches(
 	    for (i = match; i < num_matches; ++i)
 	    {
 		clen += status_match_len(xp, SHOW_MATCH(i)) + 2;
-		if ((long)clen >= Columns)
+		if (clen >= topframe->fr_width)
 		    break;
 	    }
 	    if (i == num_matches)
@@ -659,7 +659,7 @@ win_redr_status_matches(
 	while (first_match > 0)
 	{
 	    clen += status_match_len(xp, SHOW_MATCH(first_match - 1)) + 2;
-	    if ((long)clen >= Columns)
+	    if (clen >= topframe->fr_width)
 		break;
 	    --first_match;
 	}
@@ -679,7 +679,7 @@ win_redr_status_matches(
     clen = len;
 
     i = first_match;
-    while ((long)(clen + status_match_len(xp, SHOW_MATCH(i)) + 2) < Columns)
+    while (clen + status_match_len(xp, SHOW_MATCH(i)) + 2 < topframe->fr_width)
     {
 	if (i == match)
 	{
@@ -773,14 +773,17 @@ win_redr_status_matches(
 	    }
 	}
 
-	screen_puts(buf, row, 0, attr);
+	screen_puts(buf, row, firstwin->w_wincol, attr);
 	if (selstart != NULL && highlight)
 	{
 	    *selend = NUL;
-	    screen_puts(selstart, row, selstart_col, HL_ATTR(HLF_WM));
+	    screen_puts(selstart, row, firstwin->w_wincol + selstart_col,
+		    HL_ATTR(HLF_WM));
 	}
 
-	screen_fill(row, row + 1, clen, (int)Columns, fillchar, fillchar, attr);
+	screen_fill(row, row + 1, firstwin->w_wincol + clen,
+		firstwin->w_wincol + topframe->fr_width,
+		fillchar, fillchar, attr);
     }
 
     win_redraw_last_status(topframe);


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3263769634@github.com>

ddad431

unread,
Sep 7, 2025, 9:29:50 AM (3 days ago) Sep 7
to vim/vim, Subscribed
ddad431 left a comment (vim/vim#18209)

I think it's not appropriate to display the status line menu within the tabpanel area (I think this is debatable).

I agree. But I don't think anyone can accept the vert:left option under this scene. This clearly disrupts the wildmenu.

By the way, I personally do not use tab. I just feel that the current behavior is definitely not correct, so I report bug to devloper.

If there is no suitable solution in the short term, I personally suggest forcing vert:right when wildmenu is set to no pum.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3263778987@github.com>

Christian Brabandt

unread,
Sep 7, 2025, 11:53:55 AM (3 days ago) Sep 7
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18209)

I think you are right, there should not be a statusline on the tabpanel.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3263865266@github.com>

Christian Brabandt

unread,
Sep 7, 2025, 11:54:37 AM (3 days ago) Sep 7
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18209)

But I don't think anyone can accept the vert:left option under this scene.

Why not?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3263865551@github.com>

ddad431

unread,
Sep 7, 2025, 7:44:07 PM (3 days ago) Sep 7
to vim/vim, Subscribed
ddad431 left a comment (vim/vim#18209)

Why not?

Are you use wildmenu with no pum? You remind me of the PR for adding binsearch in 17441, do you really understand the move in vim? I respect and appreciate the work you've been doing in vim. But you lack taste.

I personally do not use tabs, and whatever decision you make will not affect me. I'm just concerned about the impact on other users, which is why I report issues, raise questions, and offer my suggestions. If you don't care about other users, then go ahead.

I'm really sorry if my expression made you feel uncomfortable. I don't want to waste the maintainers' time on these debates. So, I close this issues.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3264156251@github.com>

ddad431

unread,
Sep 7, 2025, 7:44:24 PM (3 days ago) Sep 7
to vim/vim, Subscribed

Closed #18209 as completed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/18209/issue_event/19552890377@github.com>

Christian Brabandt

unread,
Sep 7, 2025, 9:16:27 PM (3 days ago) Sep 7
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18209)

Wait what? I asked you about your opinion and you complain about my taste? And what exactly is your problem with the binsearch PR? If you have any issue with me or with how I manage the project please speak up, but do not make such wrong claims. This is a bit unrespectful.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3264264026@github.com>

h_east

unread,
Sep 7, 2025, 9:32:23 PM (3 days ago) Sep 7
to vim/vim, Subscribed

Reopened #18209.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/18209/issue_event/19553692925@github.com>

h_east

unread,
Sep 7, 2025, 9:32:23 PM (3 days ago) Sep 7
to vim/vim, Subscribed
h-east left a comment (vim/vim#18209)

@ddad431
The behavior you reported is clearly a display bug, so we'll discuss and fix it in this issue. So, I'm reopening it now.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3264287196@github.com>

h_east

unread,
Sep 7, 2025, 9:42:42 PM (3 days ago) Sep 7
to vim/vim, Subscribed
h-east left a comment (vim/vim#18209)

I agree that it's inconvenient when the statusline menu (no pum) is far from the command-line display/edit position. I'd like to take that into account as we reconsider the tabpanel specification.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3264302327@github.com>

ddad431

unread,
Sep 7, 2025, 9:54:27 PM (3 days ago) Sep 7
to vim/vim, Subscribed
ddad431 left a comment (vim/vim#18209)

Wait what? I asked you about your opinion and you complain about my taste? And what exactly is your problem with the binsearch PR? If you have any issue with me or with how I manage the project please speak up, but do not make such wrong claims. This is a bit unrespectful.

I am not a native English speaker, and I very apologize for previous responses has offended you.

I apologize for not answering the question directly, discussing your preferences, and making incorrect statements (that you don't care about the users).

My purpose in referencing the binsearch PR is simply to indicate that the maintainer should be able to make a quick judgment on obviously unreasonable features.

I admit that my tone is somewhat complaining. Before I think your "why not" indicates that this is right, and I find it absurd. From the user's perspective, this is obviously incorrect.

My point is: the current fix for vert:left is clearly a mistake.

At the end, I apologize again for the incorrect statement I made earlier and for the impact it had on you.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3264315247@github.com>

ddad431

unread,
Sep 7, 2025, 9:55:42 PM (3 days ago) Sep 7
to vim/vim, Subscribed
ddad431 left a comment (vim/vim#18209)

The behavior you reported is clearly a display bug, so we'll discuss and fix it in this issue. So, I'm reopening it now.

Ok.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3264316547@github.com>

Christian Brabandt

unread,
Sep 8, 2025, 3:42:07 AM (2 days ago) Sep 8
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18209)

My purpose in referencing the binsearch PR is simply to indicate that the maintainer should be able to make a quick judgment on obviously unreasonable features.

For the record, as this is off-topic here: I have a different opinion. I don't think it should be my responsibility to make quick judgements here. I think I should give the community at least some time to express their opinions on whether or not they would welcome such a change.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3265006455@github.com>

Shane-XB-Qian

unread,
Sep 8, 2025, 8:23:02 AM (2 days ago) Sep 8
to vim/vim, Subscribed
Shane-XB-Qian left a comment (vim/vim#18209)
sry jumping in :smile:

perhaps one problem: tabpanel seems cannot allow any popup overlap on it,
or '&columns' counted its size, but it actually cannot allow anything layer on it,
or even it was not a popup, but plugins may count its width.

so to keep/make existing plugins working, i may suggest:
let the '&columns' return the current value minus &tabpaneloption.columns,
in short: 'columns = &columns - &tabpaneloption.columns', and describe it in doc;
or it is a bad idea?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3266039193@github.com>

h_east

unread,
Sep 8, 2025, 9:52:54 AM (2 days ago) Sep 8
to vim/vim, Subscribed
h-east left a comment (vim/vim#18209)

This patch only fixes the issue where the part displayed on the tabpanel remains when you exit the statusline menu (no pum).

diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index a3a8e467e..fdfafcbba 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -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;


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3266441106@github.com>

h_east

unread,
Sep 8, 2025, 10:01:18 AM (2 days ago) Sep 8
to vim/vim, Subscribed
h-east left a comment (vim/vim#18209)

@Shane-XB-Qian
This issue concerns the statusline menu (no pum) displayed on the tabpanel not being cleared.
For other issues or requests regarding tabpanel, please create a separate issue.
Since tabpanel is probably not used by many people, there may be some inconsistencies in the specifications or areas that need further adjustment.
We appreciate your cooperation.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3266475040@github.com>

Shane-XB-Qian

unread,
Sep 8, 2025, 10:29:56 AM (2 days ago) Sep 8
to vim/vim, Subscribed
Shane-XB-Qian left a comment (vim/vim#18209)
:cry_smile:

--
shane.xb.qian


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18209/3266599889@github.com>

Christian Brabandt

unread,
Sep 9, 2025, 3:15:19 PM (22 hours ago) Sep 9
to vim/vim, Subscribed

Closed #18209 as completed via 95593fa.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/18209/issue_event/19596983612@github.com>

Reply all
Reply to author
Forward
0 new messages