Add per-pane-border option - #5433
Conversation
…ger show scrollbars, so fixing expected size.
|
Looks OK but I don't like the option name, it should be something starting with I'm not sure about having In In |
|
How does "pane-border-surround" sound? That keeps it in the pane-border-*
family.
WINDOW_PANESMODE was a workaround for display-panes because of the
temporary zoom. With pane-border-surround, `layout_fix_panes` was still
applying the inset during that zoom and clipping the mode screen.
WINDOW_ZOOMED alone wasn't enough when the window was already zoomed. I
later reused the same flag to hide scrollbars so they didn't shift the
overlay. That probably should have been a separate change. Let me look at
dropping the mode-specific flag and then either use something more generic
or key off the mode/zoom state directly.
I'll also add the braces in window_panes_mark_pane_border_surround and
cache the window option in the redraw context. Thanks for the feedback.
…On Sun, Jul 26, 2026 at 4:53 PM Nicholas Marriott ***@***.***> wrote:
*nicm* left a comment (tmux/tmux#5433)
<#5433 (comment)>
Looks OK but I don't like the option name, it should be something starting
with pane-border- to match the others.
I'm not sure about having WINDOW_PANESMODE rather than generic flags and
if we do have it those fixes seem like they are separate?
In window_panes_mark_per_pane_borders, you need {} around the if bodies
where they cross multiple lines.
In screen-redraw.c, we do not want to call options_get_number for every
pane, this is a window option and can be cached.
—
Reply to this email directly, view it on GitHub
<#5433?email_source=notifications&email_token=AAD37WZFUCKC3H7SOHIWKQD5GXBIXA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBYGI3TSNBSGI3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5082794226>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD37W5VAICZQJ3URYJSTFT5GXBIXAVCNFSNUABEKJSXA33TNF2G64TZHMZTMOBTGY2DONJ3JFZXG5LFHM2DSNZYHAYDSNJQGKQXMAQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
I don't like |
|
Maybe |
…and WINDOW_MODE_HIDE_SCROLLBARS. This is to avoid a display-panes specific window flag.
|
Yeah, |
|
New option needs to go in |
|
OK a few minor issues:
I also think we could do with adding test coverage for this feature. |
|
I did find another bug. When you have pane-border-status enabled, and click on x, it seems impossible to click on yes. But the bug seems to exist in master too so I didn't bring it up. Shall we include a fix for that too? |
|
I do not see this problem in |
|
On master, set status-position to 'top' and pane-border-status to 'top' or 'bottom'. Screen.Recording.2026-07-28.at.20.18.20.mov |
|
It works OK for me but the mouse position is one line off, I'll fix it. |
|
OK this seems to work well for me. A few comments: I think all these: Would be neater if you just dropped Any There are a couple of others too I think. Maybe rename I think some or all the new comments are probably either unnecessary or too big... The Can |
|
I have always wanted this feature, thanks for implementing it! I just tested it out on a local build and it seems to work great, <3 |
|
Thank you, very encouraging! |
|
@nicm, I believe we've hit all points, yes? |
|
I'm away but I'll look when I'm back on Monday, thanks. |
|
Thanks! Pushed fixes and tests to address both. |
|
If you do this: You end up with the right pane wrong. Not sure if this is worth fixing if it isn't easy. This does not work properly (the I think This may be an existing problem - this is an error: But this gets in a muddle instead: I think both cases should be an error. |
|
Interesting, let me have a look. |
|
Okay pushing updates: For item 1: on For 2–4: fix select-pane wrap with separate + bottom status; cache |
|
OK there are still some minor things with small windows, but TBH I am not wild about |
|
Let me spend a few more hours later to see if I can think of a cleaner fix? |
|
OK thanks. TBH I think we could probably live with the borders overlapping at small sizes so long as tmux does not crash or behave incorrectly. Anyone with a window that is just too small for the panes can't really expect it to work usefully, so long as it goes back to normal when the window is big enough again. When the window is big enough it should probably do the right thing with small panes though. |
This reverts commit 8f87186, deemed a fix not worth a fix for such an edge case.
|
Just pushed updates that revert the layout rebalance helpers. Yeah, it is definitely an edge case (didn't want to miss the chance to use that pun). The broken case seems to occur specifically when you do the split while in joined border type and then switch to separate. No odd borders when you do the split while already in pane-border-type separate: Chances are most users won't switch between |
|
I think this is OK but I am away next week so I will probably not look at it until I am home again. This will be a 3.9 feature in any case. |
|
Thank you for taking care of this! |


Summary
per-pane-borderthat draws a full border around each tiled pane (inset geometry + redraw).display-panesaligned with that layout: draw indexes using per-pane borders, fill the window while active, and hide scrollbars so the overlay is not shifted.Test plan
set -w per-pane-border onwith multiple tiled panes and confirm each pane gets a full borderpane-border-status(top/bottom/off) withper-pane-borderand confirm no blank/grey opposite edgedisplay-panes/prefix-qwith and without scrollbars; indexes should not shift when scrollbars are enabledcd regress && gmake(or rundisplay-panes.shat minimum), though a few of the tests are broken even in master.