From 4a9dbac43573fe4ba7e9798b159eb718ff8df2d7 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 5 Aug 2026 12:23:25 +0000 Subject: [PATCH 1/5] Add a refresh-now command and change the r binding back to it in copy mode. --- key-bindings.c | 6 +++--- tmux.1 | 8 ++++++-- window-copy.c | 48 ++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 51 insertions(+), 11 deletions(-) diff --git a/key-bindings.c b/key-bindings.c index 55f12bc83..2f44cb218 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key-bindings.c,v 1.190 2026/07/22 19:23:59 nicm Exp $ */ +/* $OpenBSD: key-bindings.c,v 1.191 2026/08/05 12:23:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -595,7 +595,7 @@ key_bindings_init(void) "bind -Tcopy-mode g { command-prompt -P -p'(goto line)' { send -X goto-line -- '%%' } }", "bind -Tcopy-mode n { send -X search-again }", "bind -Tcopy-mode q { send -X cancel }", - "bind -Tcopy-mode r { send -X refresh-toggle }", + "bind -Tcopy-mode r { send -X refresh-now }", "bind -Tcopy-mode t { command-prompt -P -1p'(jump to forward)' { send -X jump-to-forward -- '%%' } }", "bind -Tcopy-mode Home { send -X start-of-line }", "bind -Tcopy-mode End { send -X end-of-line }", @@ -705,7 +705,7 @@ key_bindings_init(void) "bind -Tcopy-mode-vi n { send -X search-again }", "bind -Tcopy-mode-vi o { send -X other-end }", "bind -Tcopy-mode-vi q { send -X cancel }", - "bind -Tcopy-mode-vi r { send -X refresh-toggle }", + "bind -Tcopy-mode-vi r { send -X refresh-now }", "bind -Tcopy-mode-vi t { command-prompt -P -1p'(jump to forward)' { send -X jump-to-forward -- '%%' } }", "bind -Tcopy-mode-vi v { send -X rectangle-toggle }", "bind -Tcopy-mode-vi w { send -X next-word }", diff --git a/tmux.1 b/tmux.1 index c689ea553..c72bf35ef 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.1153 2026/08/05 07:31:08 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.1154 2026/08/05 12:23:25 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott .\" @@ -2317,10 +2317,14 @@ the bottom and is paused while a selection is in progress. .Xc Turn off automatic refresh of the content from the pane. .It Xo -.Ic refresh\-toggle +.Ic refresh\-now (vi: r) (emacs: r) .Xc +Refresh the content from the pane once. +.It Xo +.Ic refresh\-toggle +.Xc Toggle automatic refresh of the content from the pane. .It Xo .Ic scroll\-bottom diff --git a/window-copy.c b/window-copy.c index dabb2a99c..716a0f037 100644 --- a/window-copy.c +++ b/window-copy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.424 2026/07/29 17:42:56 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.425 2026/08/05 12:23:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -54,6 +54,7 @@ static void window_copy_redraw_screen(struct window_mode_entry *); static void window_copy_do_refresh(struct window_mode_entry *, int); static void window_copy_refresh_timer(int, short, void *); static void window_copy_refresh_arm(struct window_mode_entry *); +static int window_copy_refresh_allowed(struct window_mode_entry *); static void window_copy_refresh_start(struct window_mode_entry *); static void window_copy_refresh_stop(struct window_mode_entry *); static void window_copy_style_changed(struct window_mode_entry *); @@ -3036,6 +3037,20 @@ window_copy_refresh_arm(struct window_mode_entry *wme) evtimer_add(&data->refresh_timer, &tv); } +static int +window_copy_refresh_allowed(struct window_mode_entry *wme) +{ + struct window_copy_mode_data *data = wme->data; + + /* + * Do not refresh a view of another pane (copy-mode -s): the source may + * disappear and changes are not tracked on this pane. + */ + if (data->viewmode || wme->swp != wme->wp) + return (0); + return (1); +} + static void window_copy_refresh_timer(__unused int fd, __unused short events, void *arg) { @@ -3070,11 +3085,7 @@ window_copy_refresh_start(struct window_mode_entry *wme) { struct window_copy_mode_data *data = wme->data; - /* - * Do not refresh a view of another pane (copy-mode -s): the source may - * disappear and changes are not tracked on this pane. - */ - if (data->viewmode || wme->swp != wme->wp || data->refresh_active) + if (!window_copy_refresh_allowed(wme) || data->refresh_active) return; data->refresh_active = 1; window_copy_refresh_arm(wme); @@ -3089,6 +3100,25 @@ window_copy_refresh_stop(struct window_mode_entry *wme) evtimer_del(&data->refresh_timer); } +static enum window_copy_cmd_action +window_copy_cmd_refresh_now(struct window_copy_cmd_state *cs) +{ + struct window_mode_entry *wme = cs->wme; + struct window_copy_mode_data *data = wme->data; + struct window_pane *wp = wme->wp; + int follow; + + if (!window_copy_refresh_allowed(wme)) + return (WINDOW_COPY_CMD_NOTHING); + + follow = (data->oy == 0 && + data->cy == screen_size_y(&data->screen) - 1); + window_copy_do_refresh(wme, follow); + wp->flags &= ~PANE_UNSEENCHANGES; + + return (WINDOW_COPY_CMD_REDRAW); +} + static enum window_copy_cmd_action window_copy_cmd_refresh_on(struct window_copy_cmd_state *cs) { @@ -3631,6 +3661,12 @@ static const struct { .clear = WINDOW_COPY_CMD_CLEAR_NEVER, .f = window_copy_cmd_refresh_off }, + { .command = "refresh-now", + .args = { "", 0, 0, NULL }, + .flags = WINDOW_COPY_CMD_FLAG_READONLY, + .clear = WINDOW_COPY_CMD_CLEAR_NEVER, + .f = window_copy_cmd_refresh_now + }, { .command = "refresh-toggle", .args = { "", 0, 0, NULL }, .flags = WINDOW_COPY_CMD_FLAG_READONLY, From 641e75e6e251de581fa3154fd2d1523d17d76395 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 6 Aug 2026 09:05:04 +0000 Subject: [PATCH 2/5] Add T key to change pane title, from Fouad Wahabi in GitHub issue 5461. --- key-bindings.c | 3 ++- tmux.1 | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/key-bindings.c b/key-bindings.c index 2f44cb218..2555b9fcb 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key-bindings.c,v 1.191 2026/08/05 12:23:25 nicm Exp $ */ +/* $OpenBSD: key-bindings.c,v 1.192 2026/08/06 09:05:04 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -421,6 +421,7 @@ key_bindings_init(void) "bind -N 'Spread panes out evenly' E { select-layout -E }", "bind -N 'Switch to the last client' L { switch-client -l }", "bind -N 'Clear the marked pane' M { select-pane -M }", + "bind -N 'Change the pane title' T { command-prompt -I'#T' { select-pane -T '%%' } }", "bind -N 'Enter copy mode' [ { copy-mode }", "bind -N 'Paste the most recent paste buffer' ] { paste-buffer -p }", "bind -N 'Create a new window' c { new-window }", diff --git a/tmux.1 b/tmux.1 index c72bf35ef..d0f54c91e 100644 --- a/tmux.1 +++ b/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.1154 2026/08/05 12:23:25 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.1155 2026/08/06 09:05:04 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott .\" @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: August 5 2026 $ +.Dd $Mdocdate: August 6 2026 $ .Dt TMUX 1 .Os .Sh NAME @@ -354,6 +354,8 @@ Force redraw of the attached client. Select a new session for the attached client interactively. .It t Show the time. +.It T +Change the current pane title. .It w Choose the current window interactively. .It x From 35ab6600429881b7a594548ca23d7c0d5006c2a1 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 6 Aug 2026 10:23:46 -0400 Subject: [PATCH 3/5] ci: only run `lock` and `regress` workflows on the main repo Forks are just wasting CI cycles spinning actions which are probably not looked at. Also avoid locking issues and PRs on any forks with upstream's policies. --- .github/workflows/lock.yml | 1 + .github/workflows/regress.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 9bce72248..e6765da99 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -16,6 +16,7 @@ concurrency: jobs: action: runs-on: ubuntu-latest + if: github.repository == 'tmux/tmux' steps: - uses: dessant/lock-threads@v6 with: diff --git a/.github/workflows/regress.yml b/.github/workflows/regress.yml index 95935f2f8..3cc036425 100644 --- a/.github/workflows/regress.yml +++ b/.github/workflows/regress.yml @@ -16,6 +16,7 @@ jobs: regress: name: ${{ matrix.name }} runs-on: ${{ matrix.runner }} + if: github.repository == 'tmux/tmux' timeout-minutes: 45 strategy: From 2ec1038ffd49a2fb8e5741d689bc8889820a896e Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 6 Aug 2026 21:47:20 +0000 Subject: [PATCH 4/5] =?UTF-8?q?Always=20unzoom=20before=20splitting=20wind?= =?UTF-8?q?ow,=20for=20floating=20panes=20also.=20We=20already=20unzoomed?= =?UTF-8?q?=20for=20tiled=20panes=20and=20this=20does=20the=20same=20for?= =?UTF-8?q?=20floating=20panes=20(until=20we=20support=20having=20them=20f?= =?UTF-8?q?loat=20over=20a=20zoomed=20pane).=20From=20=C3=89ric=20NICOLAS.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd-split-window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd-split-window.c b/cmd-split-window.c index 8cefba937..a089ba6a5 100644 --- a/cmd-split-window.c +++ b/cmd-split-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-split-window.c,v 1.146 2026/07/21 12:28:43 nicm Exp $ */ +/* $OpenBSD: cmd-split-window.c,v 1.147 2026/08/06 21:47:20 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -97,6 +97,8 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) enum pane_lines lines; u_int count = args_count(args); + window_unzoom(w, 1); + if (cmd_get_entry(self) == &cmd_new_pane_entry) is_floating = !args_has(args, 'L'); else { From 10048f6579209fd1ca18ff6c5436628dec012371 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 7 Aug 2026 08:10:53 +0000 Subject: [PATCH 5/5] Only unzoom in the floating-split case, modal panes take care of themselves. --- cmd-split-window.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd-split-window.c b/cmd-split-window.c index a089ba6a5..e919b6f03 100644 --- a/cmd-split-window.c +++ b/cmd-split-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-split-window.c,v 1.147 2026/08/06 21:47:20 nicm Exp $ */ +/* $OpenBSD: cmd-split-window.c,v 1.148 2026/08/07 08:10:53 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -97,11 +97,10 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) enum pane_lines lines; u_int count = args_count(args); - window_unzoom(w, 1); - if (cmd_get_entry(self) == &cmd_new_pane_entry) is_floating = !args_has(args, 'L'); else { + window_unzoom(w, 1); is_floating = window_pane_is_floating(wp); flags |= SPAWN_SPLIT; }