Michael Grant
0fffcbda3d
Move the OSC 133 output range search into grid-reader.c.
2026-10-07 15:15:25 +02:00
Michael Grant
18c4c9c702
For the *-output commands like select-output, if cmd had no output like "true" then select an empty string.
2026-10-07 15:15:25 +02:00
Michael Grant
ef6a76b485
Tidy OSC 133 output code after review.
2026-10-07 15:15:25 +02:00
Michael Grant
3959fc4d82
Wrap long lines and limit empty-line reflow consumption to OSC 133 lines.
...
Only consume an empty, unwrapped continuation line in grid_reflow_join
when it carries OSC 133 markers, so reflow of lines without markers is
unchanged. Also wrap lines over 80 columns and restore the original
PANE_REDRAW condition in window_copy_copy_buffer.
2026-10-07 15:15:25 +02:00
Michael Grant
02f09554c9
Fix wrapped output selections and recognize single-character vi selections.
2026-10-07 15:15:25 +02:00
Michael Grant
36c6630951
Fix OSC 133 output ranges after history loss and trim vi selection endpoints.
2026-10-07 15:15:25 +02:00
Michael Grant
e14d49749f
When the line containing the OSC 133 'A' marker has been discarded from history, scan retained output markers up to the next prompt. Copying and selection work from inside or after the output.
2026-10-07 15:15:25 +02:00
Michael Grant
b19a330cd3
Fix OSC 133 output ranges after resize and cursor movement.
2026-10-07 15:15:25 +02:00
Michael Grant
7d65cc2a75
Cleanup.
2026-10-07 15:15:25 +02:00
Michael Grant
65a5865ae6
Fix OSC 133 output range lookup for markers sharing a line
...
Handle C and D on the same line, output ending on the next prompt's
line, and output starting on a prompt line. Keep the output columns
when A resets a line's prompt data, and fall back to the previous
output if the range is empty. Extend the regress test to cover these
and reset the paste buffer before each check.
2026-10-07 15:15:25 +02:00
Michael Grant
abf870537c
Add pipe-selection copy mode command
2026-10-07 15:15:25 +02:00
Michael Grant
18932d06cf
Add OSC 133 copy mode output commands
2026-10-07 15:15:25 +02:00
nicm
50160131a8
Fix redraw and selection position when changing selection mode.
2026-10-06 11:24:37 +00:00
nicm
a1d25b2816
Redraw selections after scrolling to line boundaries, GitHub issue 5689
...
from bugreporter23 at gmail dot com.
2026-10-06 09:16:21 +00:00
nicm
4d2494dfee
Fix mouse drag selection on the top and bottom lines in vi mode, GitHub
...
issue 5667 from David Schweikert.
2026-10-05 22:02:40 +00:00
nicm
0a1adfa116
Instead of redrawing the entire pane or scene when moving or redrawing a
...
pane, add damage rectangles and redraw only the affected spans. From
Michael Grant.
2026-10-02 14:10:41 +00:00
nicm
e361b8f8ff
Do not trim all lines to make a zero line grid which reflow does not like, from
...
Kaixuan Li.
2026-09-21 13:44:39 +00:00
nicm
34cd5da4e3
Remove popups and all the associated overlay machinery (they were the last user
...
of it). display-popup stays but becomes an (undocumented) compatibility command
to open a floating pane.
2026-09-21 11:01:12 +00:00
nicm
bd8218e85d
When changing selection-mode to line, set up the selection start and end
...
correctly, GitHub issue 5545.
2026-09-01 14:55:35 +00:00
nicm
6a1ecdcce3
Do not try to append zero size cells, from Uzair Aftab.
2026-08-31 14:56:12 +00:00
nicm
39357c829c
Clear stale marks when a search regex fails to compile, GitHub issue
...
5547 from Uzair Aftab.
2026-08-31 14:56:12 +00:00
nicm
50d0348b64
Stop at the right end line when walking wrapped lines, GitHub issue 5479.
2026-08-19 21:05:06 +00:00
nicm
4a9dbac435
Add a refresh-now command and change the r binding back to it in copy mode.
2026-08-05 15:40:04 +00:00
nicm
44b8a40b8c
Correctly skip padding at end of line, GitHub issue 5411.
2026-07-29 20:04:06 +00:00
nicm
abd2f3a9a5
Add copy-mode-current-line-style to set style for current line in copy
...
mode, GitHub issue 5391 from Leo Henon.
2026-07-21 12:55:44 +00:00
nicm
d13b69ece4
Change cellused/size to 16 bits and time to 32 bits in grid_line and add
...
the OSC 133 positions (size stays the same).
2026-07-20 14:44:19 +00:00
nicm
1a02c9957c
Convert display-panes away from an overlay and into a mode. This is
...
another step on the road of getting rid of overlays altogether (they are
full of special cases; popups and menus are to go also eventually). We
lose some of the styling of borders but gain the ability to run
display-panes in another pane (perhaps not hugely useful but one never
knows). The -b flag goes away as no longer useful.
2026-07-14 19:57:30 +00:00
nicm
34a11db6ca
Typos and doc fixes, from Ben Boeckel.
2026-07-14 17:24:18 +00:00
nicm
a10252dad2
Handle padding and tab redraw correctly in copy mode.
2026-07-14 13:12:48 +00:00
nicm
f88189cd59
Do not clear lines when we are just going to overwrite them in copy mode.
2026-07-14 12:17:17 +00:00
nicm
2a75cc2236
Apply dragging change to scroll-down as well as scroll-up.
2026-07-13 22:40:18 +00:00
nicm
8fbbde7035
Add keys and menu items for copy mode line numbers, and a menu item for
...
auto refresh.
2026-07-13 18:59:02 +00:00
jsg
006cce5e4d
fix window_copy_mouse_in_selection() indentation; ok nicm@
2026-07-13 14:35:33 +00:00
nicm
fe1b877410
Allow drag on a selection to modify it, from Michael Grant.
2026-07-13 14:35:33 +00:00
nicm
d29aa12117
Replace the notification system with events. Events can carry a payload of
...
additional payload (to reduce problems with lifetime of objects) and are
delivered to one or more event sinks. This is more powerful and reduces the
complex dependencies between control mode and hooks. Events are now used for
hooks, control mode notifications and for monitors (set-hook -B).
wait-for can now wait for an event to fire (-E flag, with -F to for filter),
with -v to print the payload, as well as listing (-l) waiting clients on an
event and forcing one to wake (-w).
A few additional hooks are also now available (pane-created, pane-resized, etc)
and some of the existing ones have additional format variables available.
2026-07-10 13:38:45 +00:00
nicm
bcc73e0db4
Change NOTHING (which means only redraw the indicator) to MOVE. And
...
redefine NOTHING as /actually/ nothing. Use it for commands which
actually make no change. Fixes flickering due to excessive redrawing of
indicator lines. Mostly from Michael Grant.
2026-07-10 07:13:05 +00:00
nicm
3a6c717bb8
Do not exit at bottom if a selection is in progress, GitHub issue 5349
...
from xiaomublue at gmail dot com.
2026-07-09 07:54:07 +00:00
nicm
c29b41e527
Make pane scrollbars able to auto-hide after a short timeout. This
...
replaces the previous "modal" behaviour where the pane would be resized,
which tended to make a mess. Instead, the scrollbar appears when
scrolling or when hovered over with the mouse and disappears a
(configurable) short period later. From Michael Grant.
2026-06-29 07:45:09 +00:00
nicm
e0dd40f812
Clear lines before writing in copy mode to avoid leaving stray text when
...
new line is shorter than old.
2026-06-27 12:27:43 +00:00
nicm
95afd7549c
Rewrite screen-redraw.c to make it tidier and more maintainable. A scene
...
is generated and cached in the client: it holds positions and sizes of
panes, borders and so on. The scene is invalidated when a pane is moved
or resized or relevant option is changed. This scene is then drawn to
the client as needed and text and colours are filled in. With Michael
Grant.
2026-06-22 08:47:45 +00: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