Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'

* refs/remotes/tmux-openbsd/master:
  Add a flag to turn off scrollbars for display-panes; GitHub issue 5440 from David Marte.
This commit is contained in:
tmux update bot
2026-07-29 17:41:02 +00:00
3 changed files with 20 additions and 7 deletions

4
tmux.h
View File

@@ -1,4 +1,4 @@
/* $OpenBSD: tmux.h,v 1.1416 2026/07/27 19:15:58 nicm Exp $ */
/* $OpenBSD: tmux.h,v 1.1417 2026/07/29 14:06:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1194,6 +1194,8 @@ struct window_mode {
int flags;
#define WINDOW_MODE_HIDE_PANE_STATUS 0x1
#define WINDOW_MODE_NO_STACK 0x2
#define WINDOW_MODE_FILL_WINDOW 0x4
#define WINDOW_MODE_HIDE_SCROLLBARS 0x8
struct screen *(*init)(struct window_mode_entry *,
struct cmdq_item *, struct cmd_find_state *,

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: window-panes.c,v 1.3 2026/07/19 19:53:11 nicm Exp $ */
/* $OpenBSD: window-panes.c,v 1.4 2026/07/29 14:06:32 nicm Exp $ */
/*
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -35,7 +35,8 @@ static void window_panes_key(struct window_mode_entry *,
const struct window_mode window_panes_mode = {
.name = "panes-mode",
.flags = WINDOW_MODE_HIDE_PANE_STATUS|WINDOW_MODE_NO_STACK,
.flags = WINDOW_MODE_HIDE_PANE_STATUS|WINDOW_MODE_NO_STACK|
WINDOW_MODE_FILL_WINDOW|WINDOW_MODE_HIDE_SCROLLBARS,
.init = window_panes_init,
.free = window_panes_free,

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: window.c,v 1.368 2026/07/23 09:38:27 nicm Exp $ */
/* $OpenBSD: window.c,v 1.369 2026/07/29 14:06:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -2460,11 +2460,21 @@ window_pane_mode(struct window_pane *wp)
int
window_pane_show_scrollbar(struct window_pane *wp)
{
struct window *w = wp->window;
struct window_mode_entry *wme;
if (SCREEN_IS_ALTERNATE(&wp->base))
return (0);
if (wp->window->sb == PANE_SCROLLBARS_ALWAYS ||
wp->window->sb == PANE_SCROLLBARS_AUTOHIDE ||
(wp->window->sb == PANE_SCROLLBARS_MODAL &&
if ((w->flags & WINDOW_ZOOMED) && w->active != NULL) {
wme = TAILQ_FIRST(&w->active->modes);
if (wme != NULL &&
(wme->mode->flags & WINDOW_MODE_HIDE_SCROLLBARS)) {
return (0);
}
}
if (w->sb == PANE_SCROLLBARS_ALWAYS ||
w->sb == PANE_SCROLLBARS_AUTOHIDE ||
(w->sb == PANE_SCROLLBARS_MODAL &&
window_pane_mode(wp) != WINDOW_PANE_NO_MODE))
return (1);
return (0);