264 Commits

Author SHA1 Message Date
Mitchell Hashimoto
d139e9c611 terminal/new: screen passes all resize tests 2024-03-22 20:27:35 -07:00
Mitchell Hashimoto
57deadce97 terminal/new: more reflow tests with wide chars 2024-03-22 20:27:35 -07:00
Mitchell Hashimoto
93e63d5356 terminal/new: pagelist resize preserves semantic prompt 2024-03-22 20:27:35 -07:00
Mitchell Hashimoto
ac007221b3 terminal/new: copy graphemes for reflow 2024-03-22 20:27:34 -07:00
Mitchell Hashimoto
e83936701d terminal/new: semantic prompt saving tests 2024-03-22 20:27:34 -07:00
Mitchell Hashimoto
a6ad489c97 terminal/new: fix issue with resizing when cursor is in blank trailing
cell
2024-03-22 20:27:34 -07:00
Mitchell Hashimoto
af3224d5fb terminal/new: more less cols tests 2024-03-22 20:27:34 -07:00
Mitchell Hashimoto
b6de7eca95 terminal/new: more reflow less cols tests 2024-03-22 20:27:34 -07:00
Mitchell Hashimoto
95fca1d72b terminal/new: handle blank lines in reflow 2024-03-22 20:27:34 -07:00
Mitchell Hashimoto
2147097631 terminal/new: fix up cursor on grow cols 2024-03-22 20:27:34 -07:00
Mitchell Hashimoto
fad08ade5b terminal/new: lots more tests ported 2024-03-22 20:27:34 -07:00
Mitchell Hashimoto
f1887e7b1b terminal/new: resize more cols ignores trailing empty cells 2024-03-22 20:27:33 -07:00
Mitchell Hashimoto
7b70dd1338 terminal/new: more resize more cols tests 2024-03-22 20:27:33 -07:00
Mitchell Hashimoto
839fae55f4 terminal/new: port more screen resize tests 2024-03-22 20:27:33 -07:00
Mitchell Hashimoto
d71657ded1 terminal/new: start porting resize tests, bugs 2024-03-22 20:27:33 -07:00
Mitchell Hashimoto
4632dd359d terminal/new: more no reflow tests 2024-03-22 20:27:32 -07:00
Mitchell Hashimoto
eb3323940d terminal/new: more no reflow tests 2024-03-22 20:27:32 -07:00
Mitchell Hashimoto
2e21f2179d terminal/new: port lots of no reflow screen resizes 2024-03-22 20:27:32 -07:00
Mitchell Hashimoto
9269d70f03 terminal/new: resize less rows trims blank lines first 2024-03-22 20:27:32 -07:00
Mitchell Hashimoto
43ad442ffe terminal/new: screen resize stubs (don't work) 2024-03-22 20:27:31 -07:00
Mitchell Hashimoto
e5cb77fe62 terminal: mark off test 2024-03-22 20:27:31 -07:00
Mitchell Hashimoto
07639e48ab terminal/new: more screen tests 2024-03-22 20:27:31 -07:00
Mitchell Hashimoto
07eaedf1fb terminal/new: eraseRows viewport behavior 2024-03-22 20:27:31 -07:00
Mitchell Hashimoto
ee6344eac8 terminal/new: screen clone tests 2024-03-22 20:27:31 -07:00
Mitchell Hashimoto
e903d5ed22 terminal: remove old logs 2024-03-22 20:27:31 -07:00
Mitchell Hashimoto
06376fcb0b terminal/new: clone can take a shared pool 2024-03-22 20:27:31 -07:00
Mitchell Hashimoto
5fe495e228 terminal: noting uncopied tests 2024-03-22 20:27:30 -07:00
Mitchell Hashimoto
26edb51d0c terminal/new: screen scrollClear tests 2024-03-22 20:27:30 -07:00
Mitchell Hashimoto
3842ca9212 terminal/new: screen scrolling tests 2024-03-22 20:27:30 -07:00
Mitchell Hashimoto
7ce4010f7a terminal/new: scrolling viewport into active area pins to active 2024-03-22 20:27:30 -07:00
Mitchell Hashimoto
bfa574fa60 terminal/new: Screen new scrolldown should inherit bg color 2024-03-22 20:27:30 -07:00
Mitchell Hashimoto
eaa78477d5 terminal: fix tests for brackets on selectWord 2024-03-04 14:30:28 -08:00
Adam Stephens
59485713b4 screen/selectword: add more boundary characters 2024-02-29 22:30:30 -05:00
Mitchell Hashimoto
2d612ab168 terminal: preserve multi-point grapheme clusters on scrollback deletion
This codepath was not previously tested (an accident). Upon testing
this codepath its clear to see the logic was incorrect. When we have to
remove rows from our scrollback to fit new rows in the circular buffer,
we have to delete graphemes, but we were deleting them from the wrong
row offset.

For the row offset, we previously used the _active_ screen but the
proper offset is the _full_ screen. Tests verify.
2024-01-25 09:35:56 -08:00
Mitchell Hashimoto
48d6c93e09 terminal: select line considers semantic prompt change a boundary
Fixes #1329

Some shells and scripts use spaces and soft-wrapping as a way to move to
the next line instead of using newline (`\n`). Line selection
(triple-click by default) considers a soft-wrapped line as a single
line, so it was selecting the prompt.

This commit makes it so line selection considers semantic prompt state
(prompt vs command output) an additional boundary condition. This
requires shell integration but will make selection behave more
expectedly.
2024-01-19 15:48:53 -08:00
Mitchell Hashimoto
adb7958f61 remove tracy usage from all files 2024-01-13 15:06:08 -08:00
Jeffrey C. Ollie
f4292bccfc replace deprecated std.mem.tokenize with std.mem.tokenizeScalar 2024-01-03 10:22:33 -06:00
Gregory Anders
060bdff117 terminal: track palette color in cell state
Rather than immediately converting a color palette index into an RGB
value for a cell color, when a palette color is used track the palette
color directly in the cell state and convert to an RGB value in the
renderer.

This causes palette color changes to take effect immediately instead of
only for newly drawn cells.
2024-01-02 22:34:06 -06:00
Mitchell Hashimoto
b573ff137a terminal: resize cols should treat old cursor pos as active point
Fixes #1159

The cursor position is an "active" coordinate (defined at the top of
Screen.zig), but our resize was treating it as a "viewport" coordinate.
2023-12-26 13:59:22 -08:00
Mitchell Hashimoto
4a3e1e15e5 core: click to move cursor 2023-12-20 21:33:13 -08:00
Mitchell Hashimoto
6b1fd2b9eb terminal: Screen.promptPath 2023-12-20 20:50:10 -08:00
Mitchell Hashimoto
9a32ea515b terminal: Screen.selectPrompt to get the selection of the prompt 2023-12-20 20:35:05 -08:00
Mitchell Hashimoto
b327aab3d0 terminal: resize to less rows with empty lines should trim lines
Fixes #1030
2023-12-09 14:30:54 -08:00
Chris Marchesi
b84fb25e55 Add rectangle select
This adds rectangle select mode; when dragging with ctrl+alt (or
super+alt on MacOS), this allows you to select a rectangular region of
the terminal instead of the full start-end points of the buffer.
2023-11-30 12:35:52 -08:00
Mitchell Hashimoto
aa86031ff6 terminal: move line searching here, unit test 2023-11-29 15:30:22 -08:00
Mitchell Hashimoto
c7ccded359 terminal: Screen.getLine 2023-11-29 15:30:07 -08:00
Mitchell Hashimoto
3aba42c3f7 terminal: stringmaps 2023-11-29 15:30:07 -08:00
Mitchell Hashimoto
0487dbfb25 terminal: selectionString uses arraylist to build results 2023-11-29 15:30:07 -08:00
Mitchell Hashimoto
7fc95690bc terminal: basic lineIterator on screen 2023-11-29 15:30:07 -08:00
Mitchell Hashimoto
44e28e43d3 terminal: fix cursor pos when resizing more rows not at bottom
Fixes #906

This changes our resize behavior when increasing row height.

If the cursor was originally at the bottom of the viewport, existing
scrollback (if it exists) will be "pulled down" from the top,
effectively keeping the cursor at the bottom. This is the behavior
today, prior to this commit.

If the cursor is not at the bottom of the viewport, scrollback will NOT
be "pulled down" and instead blank lines will be added _below_. This is
new behavior.
2023-11-21 11:27:02 -08:00