Michael Grant
fe1c3db1e5
Fix cursor and redraw overlap with auto-hide scrollbars
...
Auto-hide scrollbars are drawn as overlays inside the pane rather than in
reserved columns. Avoid optimized pane scrolling/redraw paths writing through
a visible overlay scrollbar, and suppress the terminal cursor when it would be
placed in the visible overlay scrollbar column.
This prevents transient wrong-colour cells and cursor blocks appearing over
the scrollbar, especially when scrolling small floating panes. This fixed
the green block issue.
2026-06-20 09:09:27 +02:00
Michael Grant
738083c4a4
Add scrollbar auto-hide feature.
2026-06-20 08:29:47 +02:00
Nicholas Marriott
de9d2fe1e0
Rename screen_redraw_ to redraw_.
2026-06-18 16:06:34 +01:00
nicm
4b772fd783
Allow rectangle selection to extend past end of current line to behave
...
the same as vi with virtualedit=block set. From Mark Kelly in GitHub
issue 5227.
2026-06-16 09:28:17 +00:00
nicm
b1054ac227
With mode-keys vi, keep cursor in the same position relative to the text
...
when scrolling. GitHub issue 5216 from Arseniy Simonov.
2026-06-13 20:39:11 +00:00
nicm
34a6a9d3a1
Change relative time for now to only work in the past and not show a
...
sign which is more useful. Also tidy up some minor style nits.
2026-06-13 08:59:52 +00:00
nicm
8cb4aabb8b
Replace refresh-from-pane in copy mode with a way to automatically
...
update as pane content changes. This is toggled by pressing r. GitHub
issue 5165 from Barrett Ruth.
2026-06-10 14:29:08 +00:00
nicm
d533d7c97c
Add a context for cell/palette/hyperlinks when drawing to tty to avoid
...
passing so much in parameters.
2026-06-09 21:22:22 +00:00
nicm
6beebbe074
Fix scrollbar drag position when window is taller than tty, from Michael
...
Grant.
2026-06-04 09:24:03 +00:00
nicm
f12d7b4e67
When mode-keys is set to vi, do not allow the cursor to go into the
...
invisible extra cell to the right of the visible text. This is closer to
what vi(1) does. From Max Vim in GitHub issue 5070.
2026-05-17 13:12:21 +00:00
nicm
b24b8424b1
Switch to use backing grid not copy mode's grid for copy line, GitHub
...
issue 4995.
2026-05-17 12:38:04 +00:00
nicm
496805476e
Require layout prefix to be 5 characters, GitHub issue 5067 from
...
cglosner at gmail dot com.
2026-05-07 09:21:05 +00:00
nicm
962e565591
Add Emacs-style recentre-top-bottom, GitHub issue 5053 from sinyax75 at
...
gmail dot com.
2026-05-07 09:15:44 +00:00
nicm
524f283cc6
Add support for line numbers in copy mode. A new copy-mode-line-numbers
...
option has the following modes: off, default (tmux's normal line
numbering where 0 is the top visible line), absolute (first line in
history is 1), relative (relative to the cursor) and hybrid (current
line is absolute, others relative). Also adds
copy-mode-line-number-style and copy-mode-current-line-number-style to
set the style of the line numbers. When copy mode is entered with the
mouse, line numbers stay off.
From Leo Henon in GitHub issue 5025.
2026-05-01 09:44:42 +00:00
nicm
2a5715fad5
Do not deref NULL job in window_copy_pipe_run when job_run fails. From
...
Barrett Ruth in GitHub issue 5036.
2026-04-28 08:35:21 +00:00
nicm
314f0ae964
Do not leak hyperlinks in copy mode, from Barrett Ruth in GitHub issue
...
5020.
2026-04-22 07:03:06 +00:00
nicm
8b51abef08
Check for \0 after skipping # not before in format_expand1, from ossfuzz.
2026-04-02 08:37:14 +00:00
nicm
022b5cf193
When in copy mode with a large scroll offset and the window is resized
...
so that history shrinks, data->oy can exceed screen_hsize causing an
unsigned integer underflow in the py computation. Clamp data->oy in
window_copy_resize and window_copy_cmd_refresh_from_pane before the
subtraction. From futpib at gmail dot com in GitHub issue 4958.
2026-03-30 09:23:40 +00:00
nicm
49bb43047d
Allow copy mode to work for readonly clients, except for copy commands,
...
from Dane Jensen.
2026-03-03 12:26:14 +00:00
nicm
5ff385f8a9
Tweak previous to reset cursor again as well.
2026-02-25 07:59:45 +00:00
nicm
9316476a73
Add commands to turn exit on scroll on, off, toggle. From xcdnlgd at
...
hotmail dot com in GitHub issue 4884.
2026-02-24 08:00:43 +00:00
nicm
f218463976
grid_peek_cell can return NULL, so check for it. From Conor Taylor in
...
GitHub issue 4848.
2026-02-16 08:02:04 +00:00
nicm
7e50eb0e83
Make paste_get_top return a copy of the buffer name which is more
...
sensible and avoids a double free pointed out by DongHan Kim.
2026-02-11 08:30:37 +00:00
nicm
7b1c503086
Clear search counts when clearing marks in case of repeated search,
...
reported by Daniel Pereira in GitHub issue 4817.
2026-02-06 10:28:42 +00:00
nicm
62944da74b
Make OSC 52 work in popups, from gogongxt at 163 dot com in GitHub issue
...
4797.
2026-02-03 09:07:44 +00:00
nicm
588013bb44
Refresh copy mode when style changes, from Josh Cooper in GitHub issue 4830.
2026-02-03 08:53:58 +00:00
nicm
195a9cfd88
When history-limit is changed, apply to existing panes, not just new
...
ones. GitHub issue 4705.
2026-01-22 08:55:01 +00:00
nicm
9c0aeaff40
Now the copy mode indicator can be changed, we need to redraw it when
...
the cursor is moved. GitHub issue 4774.
2026-01-19 08:20:51 +00:00
nicm
b5c33ca2b7
Add selection_mode format variable for copy mode, from Mike Jonkmans in
...
GitHub issue 4773.
2025-12-25 18:05:15 +00:00
nicm
672e89a640
Add a scroll-to-mouse command for copy mode to scroll to the mouse
...
position and bind to the scrollbar, brings the scrollbar keys into line
with the other mouse keys. From Michael Grant, GitHub issue 4731.
2025-12-10 21:24:43 +00:00
nicm
9d6c69ebde
Fix y offset of mouse if status at top. GitHub issue 4738 from Michael
...
Grant.
2025-12-04 14:45:32 +00:00
nicm
9e21f426c0
Add a command to explcitly set the selection mode in copy mode, GitHub
...
issue 3842.
2025-11-12 07:53:22 +00:00
jsg
c1667bd85e
consistently use tabs for indentation
...
found with smatch, ok nicm@
2025-11-07 12:30:36 +00:00
nicm
0c5abfefd3
Add commands to centre the cursor in copy mode, from m-einfalt at gmx
...
dot de in GitHub issue 4662.
2025-10-28 16:36:52 +00:00
nicm
f31a2d229c
Do not play games with lines for view mode output since it stops them
...
wrapping, GitHub issue 4462.
2025-10-27 20:31:40 +00:00
nicm
05b2893b9f
Do not leak buffer if not used, reported by someone in GitHub issue
...
4575.
2025-08-04 13:22:10 +00:00
nicm
47dff97834
Use backing grid for word in copy mode for wrapped flags, from someone
...
in GitHub issue 4447.
2025-04-03 11:51:27 +00:00
nicm
f101762d1b
Fix mouse_hyperlink format in copy mode. From someone in GitHub issue
...
4418.
2025-03-21 14:04:26 +00:00
nicm
5eb30c1543
Handle padding cells correctly for regular expression searching, GitHub issue 4399 from
...
github at jyn dot dev.
2025-03-17 20:33:20 +00:00
nicm
084e6ee9ec
Add a -M flag to capture-pane to use the copy mode screen, GitHub issue
...
4358.
2025-02-20 13:39:58 +00:00
nicm
6f7db82b18
Add copy-mode-position-style and copy-mode-selection-style for copy
...
mode (they default to mode-style as before).
2024-11-26 15:52:41 +00:00
nicm
273f9b2027
Fix word navigation on lines with tabs, from Alexander Arch.
2024-11-20 20:54:02 +00:00
nicm
f527412d9b
Tidy up loop, from Alexander Arch.
2024-11-12 10:06:35 +00:00
nicm
713cacab1e
Mouse support on the scrollbars, from Michael Grant.
2024-11-12 09:32:56 +00:00
nicm
596ea62dc3
Some fixes for searching for tabs, from Alexander Arch.
2024-11-08 08:51:36 +00:00
nicm
09f4e43189
Add support for a scrollbar at the side of each pane. New options
...
pane-scrollbars turn them on or off, pane-scrollbars-position sets the
position (left or right), and pane-scrollbars-style to set the colours.
Mouse support will come later. From Michael Grant in GitHub issue 4221.
2024-11-05 09:41:17 +00:00
nicm
c8bd42de16
Match tab cells when searching, from Alexander Arch in GitHub issue
...
4201.
2024-10-28 08:16:51 +00:00
nicm
487b0ee124
Do not attempt to search for zero length strings, from Alexander Arch in
...
GitHub issue 4209.
2024-10-25 15:19:15 +00:00
nicm
eaec0a48f4
Do not stop stop at first padding in format_grid_line and handle tabs.
2024-10-25 15:13:10 +00:00
nicm
fdbc6cdea5
Flag tabs if possible in the grid cell so they can be preserved on
...
copying and capture-pane. From Alexander Arch in GitHub issue 4201.
2024-10-25 15:00:18 +00:00