Commit Graph

12338 Commits

Author SHA1 Message Date
Michael Grant
1e677d8acd Add regress tests for OSC 133 reflow and history loss.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-08 21:10:16 +02:00
Michael Grant
b4810e5b2d Fix collapsed copy mode on resize and with the cursor below the output.
Rebuilding the folded view wrote a linefeed for every source line, including
the blank lines at the end, so shrinking the window scrolled the collapsed
output into history. Stop at the last non-blank line and rebuild a folded view
at the new size when the window is resized.

When no cursor position could be restored, the fallback used the source row,
which can be past the bottom of the shorter folded view and was then used to
index the grid. Fall back to the nearest visible line and clamp to the screen.

Keep the unfolded source only while fold view is on, so plain copy mode is
back to the incremental sync with one copy of the history. Document
toggle-output -m, and rename struct input_osc_133_ctx to struct osc133_marker.
Line numbers started with L stay absolute when fold view is toggled.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-08 21:05:19 +02:00
Michael Grant
0d65a0f60c Prepare collapsible OSC 133 output for review
Use the parent output-range implementation and preserve source rows and columns when output is folded or wrapped. Clear stale exit-status presence on repeated D markers. Apply the requested coding style and add regressions for folded output selections and prompt properties.
2026-10-08 21:05:19 +02:00
Michael Grant
303ff3be8e More cleanup. 2026-10-08 21:05:18 +02:00
Michael Grant
6bd2a4a1c9 Moved helpers to input.c with the other osc_133 helpers. 2026-10-08 21:05:18 +02:00
Michael Grant
c8589c5086 Cleanup: moved the osc-133 marker save/restore into screen-write.c closer to where the issue existed. 2026-10-08 21:05:18 +02:00
Michael Grant
23bc2fe042 Fix clear issue which lost C and A osc133 markers. Several cleanups. 2026-10-08 21:05:18 +02:00
Michael Grant
c7bd288171 Add collapsible OSC 133 output to copy mode 2026-10-08 21:05:18 +02:00
Nicholas Marriott
82abcd175c Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Add commands to copy mode to select, pipe and open OSC 133 command output, from Michael Grant.
  Fix bugs with empty panes and load-buffer -w, GitHub issue 5701 from Alexandre Fiori.
  Track allocations in yacc to avoid leaking when parsing commands, GitHub issue 5632 from Jeong, Heon.
  Fix commands being lost when chained with assignment, GitHub issue 5702 from Jeong, Heon
2026-10-08 16:36:34 +01:00
nicm
a0a0e12234 Add commands to copy mode to select, pipe and open OSC 133 command
output, from Michael Grant.
2026-10-08 13:32:31 +00:00
nicm
cb44afd415 Fix bugs with empty panes and load-buffer -w, GitHub issue 5701 from
Alexandre Fiori.
2026-10-08 13:32:31 +00:00
nicm
9a92292029 Track allocations in yacc to avoid leaking when parsing commands, GitHub
issue 5632 from Jeong, Heon.
2026-10-08 13:32:31 +00:00
nicm
4dc67a5dd6 Fix commands being lost when chained with assignment, GitHub issue 5702
from Jeong, Heon
2026-10-08 13:32:31 +00:00
Nicholas Marriott
48bbaa1172 Test for 5701. 2026-10-08 08:06:59 +01:00
Nicholas Marriott
ae33689815 Test for 5702. 2026-10-08 07:31:03 +01:00
tmux update bot
d217b37be9 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Add sort order flags to switch-mode, GitHub issue 5696 from harikp2002 at gmail dot com.
2026-10-07 19:52:49 +00:00
nicm
f7195bec82 Add sort order flags to switch-mode, GitHub issue 5696 from harikp2002
at gmail dot com.
2026-10-07 19:52:47 +00:00
tmux update bot
9286115b43 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Show match count in copy mode, GitHub issue 5399.
  Add window-default-command option to override default-command per window, from Meriel Sartha Mittelbach.
  Do not change active pane if joining a pane to the same window. Reported by David le Blanc.
2026-10-07 13:58:41 +00:00
nicm
ddd0698e30 Show match count in copy mode, GitHub issue 5399. 2026-10-07 13:58:39 +00:00
nicm
d041d56bb2 Add window-default-command option to override default-command per
window, from Meriel Sartha Mittelbach.
2026-10-07 13:58:39 +00:00
nicm
e63e2df764 Do not change active pane if joining a pane to the same window. Reported
by David le Blanc.
2026-10-07 13:58:39 +00:00
Nicholas Marriott
5512949947 Test for 5696. 2026-10-07 14:14:02 +01:00
Nicholas Marriott
052c54fb49 Test for 5399. 2026-10-07 14:01:09 +01:00
Nicholas Marriott
b04055d577 Test for join-pane with modal floating pane. 2026-10-07 13:03:16 +01:00
Nicholas Marriott
6c30e1bc03 Make terminal bigger so test works on macOS. 2026-10-07 11:18:24 +01:00
Nicholas Marriott
a8158b2443 Fix test on macOS and add new test for tty. 2026-10-07 11:02:08 +01:00
Nicholas Marriott
f5c8e5acbd Fix tests. 2026-10-07 10:45:25 +01:00
tmux update bot
64ffd431de Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Fix tty_clamp_area with status lines at the top and a smaller client, GitHub issue 5697 from Yasuhiro Inami.
2026-10-07 09:35:09 +00:00
nicm
37b1631e57 Fix tty_clamp_area with status lines at the top and a smaller client,
GitHub issue 5697 from Yasuhiro Inami.
2026-10-07 09:35:07 +00:00
Nicholas Marriott
3e22d43c66 Fix tests. 2026-10-07 10:16:50 +01:00
Nicholas Marriott
2d7bca72e7 Fix tests. 2026-10-07 09:42:00 +01:00
Nicholas Marriott
7b4d4074cf Fix tests. 2026-10-07 09:08:33 +01:00
Nicholas Marriott
3b20a0418a Fix tests. 2026-10-07 08:06:16 +01:00
Nicholas Marriott
20555f1508 Fix tests. 2026-10-07 07:29:44 +01:00
Nicholas Marriott
209d389a81 Fix test again. 2026-10-07 06:46:25 +01:00
Nicholas Marriott
4775bc95e1 Fix tests on macOS. 2026-10-07 06:35:49 +01:00
Nicholas Marriott
aa52838c84 Don't use so many ptys. 2026-10-07 06:28:47 +01:00
Nicholas Marriott
da1ba778e4 Increase pty limit on macOS. 2026-10-07 06:08:35 +01:00
tmux update bot
a7a3b4b3a8 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Parse terminal replies with keys and apply them only when finished, so that a preceding Escape can be handled correctly. GitHub issue 5676 from Joan Fabrégat.
  Use the .Cm macro for keywords used as arguments to commands and options, mostly replacing dubious use of .Ic, but a few others as well; nicm@ agrees with the general direction.
2026-10-06 21:00:17 +00:00
nicm
61581458a4 Parse terminal replies with keys and apply them only when finished, so
that a preceding Escape can be handled correctly. GitHub issue 5676 from
Joan Fabrégat.
2026-10-06 21:00:15 +00:00
schwarze
198196e53e Use the .Cm macro for keywords used as arguments to commands and options,
mostly replacing dubious use of .Ic, but a few others as well;
nicm@ agrees with the general direction.
2026-10-06 21:00:15 +00:00
Nicholas Marriott
059df9643c Tests for 5675. 2026-10-06 18:50:37 +01:00
tmux update bot
81dc40dedf Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Add table for destroy-unattached.
  Do not allow drags started on status line to trigger pane key bindings, GitHub issue 5692.
2026-10-06 16:10:29 +00:00
nicm
e21f5e2d63 Add table for destroy-unattached. 2026-10-06 16:10:27 +00:00
nicm
b4f7b85e86 Do not allow drags started on status line to trigger pane key bindings,
GitHub issue 5692.
2026-10-06 16:10:27 +00:00
Nicholas Marriott
068812380f Test for drag on status line. 2026-10-06 12:28:40 +01:00
tmux update bot
0e59d2c035 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Fix redraw and selection position when changing selection mode.
2026-10-06 11:24:38 +00:00
nicm
50160131a8 Fix redraw and selection position when changing selection mode. 2026-10-06 11:24:37 +00:00
tmux update bot
f22e1d95b2 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Improve text about status lines, GitHub issue 5677.
  Redraw selections after scrolling to line boundaries, GitHub issue 5689 from bugreporter23 at gmail dot com.
2026-10-06 09:16:23 +00:00
nicm
d6237b5b87 Improve text about status lines, GitHub issue 5677. 2026-10-06 09:16:21 +00:00