Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2024-11-15 10:01:11 +00:00
7 changed files with 34 additions and 43 deletions

View File

@ -1736,3 +1736,16 @@ window_pane_mode(struct window_pane *wp)
}
return (WINDOW_PANE_NO_MODE);
}
/* Return 1 if scrollbar is or should be displayed. */
int
window_pane_show_scrollbar(struct window_pane *wp, int sb_option)
{
if (SCREEN_IS_ALTERNATE(wp->screen))
return (0);
if (sb_option == PANE_SCROLLBARS_ALWAYS ||
(sb_option == PANE_SCROLLBARS_MODAL &&
window_pane_mode(wp) != WINDOW_PANE_NO_MODE))
return (1);
return (0);
}