mirror of
https://github.com/tmux/tmux.git
synced 2026-06-20 17:25:57 +00:00
Add scrollbar auto-hide feature.
This commit is contained in:
8
layout.c
8
layout.c
@@ -433,7 +433,7 @@ layout_fix_panes(struct window *w, struct window_pane *skip)
|
||||
sy--;
|
||||
}
|
||||
|
||||
if (window_pane_show_scrollbar(wp, scrollbars)) {
|
||||
if (window_pane_scrollbar_reserve(wp, scrollbars)) {
|
||||
sb_w = wp->scrollbar_style.width;
|
||||
sb_pad = wp->scrollbar_style.pad;
|
||||
if (sb_w < 1)
|
||||
@@ -506,7 +506,8 @@ layout_resize_check(struct window *w, struct layout_cell *lc,
|
||||
/* Space available in this cell only. */
|
||||
if (type == LAYOUT_LEFTRIGHT) {
|
||||
available = lc->sx;
|
||||
if (scrollbars)
|
||||
if (scrollbars && !options_get_number(w->options,
|
||||
"pane-scrollbars-auto-hide"))
|
||||
minimum = PANE_MINIMUM + sb_style->width +
|
||||
sb_style->pad;
|
||||
else
|
||||
@@ -1210,7 +1211,8 @@ layout_split_pane(struct window_pane *wp, enum layout_type type, int size,
|
||||
/* Check there is enough space for the two new panes. */
|
||||
switch (type) {
|
||||
case LAYOUT_LEFTRIGHT:
|
||||
if (scrollbars) {
|
||||
if (scrollbars && !options_get_number(wp->window->options,
|
||||
"pane-scrollbars-auto-hide")) {
|
||||
minimum = PANE_MINIMUM * 2 + sb_style->width +
|
||||
sb_style->pad;
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user