mirror of
https://github.com/tmux/tmux.git
synced 2026-10-09 11:44:23 +00:00
Make pane scrollbars able to auto-hide after a short timeout. This
replaces the previous "modal" behaviour where the pane would be resized, which tended to make a mess. Instead, the scrollbar appears when scrolling or when hovered over with the mouse and disappears a (configurable) short period later. From Michael Grant.
This commit is contained in:
6
layout.c
6
layout.c
@@ -462,7 +462,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)
|
||||
@@ -535,7 +535,7 @@ 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 == PANE_SCROLLBARS_ALWAYS)
|
||||
minimum = PANE_MINIMUM + sb_style->width +
|
||||
sb_style->pad;
|
||||
else
|
||||
@@ -1263,7 +1263,7 @@ layout_split_check_space(struct window_pane *wp, struct layout_cell *lc,
|
||||
|
||||
switch (type) {
|
||||
case LAYOUT_LEFTRIGHT:
|
||||
if (scrollbars) {
|
||||
if (scrollbars == PANE_SCROLLBARS_ALWAYS) {
|
||||
minimum = PANE_MINIMUM * 2 + sb_style->width +
|
||||
sb_style->pad;
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user