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
Correctly cleanup the overlapping areas with the wildmenu(no pum) completion row.
v9.1.1732
OS: Windows 11 24H2 26100.5074
Terminal: Windows terminal 1.1824013001
$TERM:
Shell: PowerShell 7.5.2
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
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:
:set tabpanelopt=align:right,vert :a<Tab>
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
This is a patch that changes the behavior above.
patchdiff --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.
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.
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.
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.
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.
Closed #18209 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
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.
Reopened #18209.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@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.
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.
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.
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.
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.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
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.
@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.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
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.