Mitchell Hashimoto
56f8e39e5b
Update zig, mach, fmt
2023-06-25 11:08:20 -07:00
Mitchell Hashimoto
c6356930cc
renderer: support invisible attribute
2023-06-25 09:31:33 -07:00
Mitchell Hashimoto
8d40fba9ce
terminal: correct assertion for scrollUp
2023-06-23 14:06:40 -07:00
Mitchell Hashimoto
860209e968
terminal: track underline color on cell
2023-06-20 09:37:58 -07:00
Mitchell Hashimoto
e26cb46f4a
terminal: tests for semantic prompt on resize
2023-05-31 16:20:30 -07:00
Mitchell Hashimoto
414f2e52a5
terminal: semantic prompt aware resize
2023-05-31 16:16:00 -07:00
Mitchell Hashimoto
4047a90555
terminal: track semantic prompt metadata per row
2023-05-27 15:45:51 -07:00
Mitchell Hashimoto
b196e43ee4
fix some issues for future Zig update
2023-05-19 08:34:07 -07:00
Mitchell Hashimoto
97d9157d22
update zig version
2023-05-07 20:50:51 -07:00
Mitchell Hashimoto
5225836415
terminal: selectWord stops at single/double quote boundaries
2023-03-23 10:48:03 -07:00
Mitchell Hashimoto
70236ebc33
terminal: screen scroll with full scrollback modifies selection
2023-03-21 10:59:44 -07:00
Mitchell Hashimoto
dfb40426a0
move selection to screen
2023-03-21 10:43:50 -07:00
Mitchell Hashimoto
54d6654d8b
terminal: selectLine can select last line with scrollback
...
We had incorrect logic around when the line you want to select is the
last line and it crashed. A new test case covers this.
2023-03-17 11:07:43 -07:00
Mitchell Hashimoto
4ececc8923
screen: resize rows should use old cols value
2023-03-02 13:46:58 -08:00
Mitchell Hashimoto
ba96a2c023
screen: adding cols doesn't mess with the viewport
...
This was untested anyways, and the result was bugs!
2023-03-01 22:14:19 -08:00
Mitchell Hashimoto
28378a350d
screen: shrinking cols trims trailing blank lines
2023-03-01 22:01:42 -08:00
Mitchell Hashimoto
05fe2a83b1
terminal: erase display below should unwrap soft wrapped state
2023-03-01 21:30:31 -08:00
Mitchell Hashimoto
56cb1dd55b
screen: correct cursor position with scrollback and less cols
2023-03-01 21:06:33 -08:00
Mitchell Hashimoto
979dc5a439
screen: redo resizing to less columns
...
This is more performant (prefers fast copies if no wrapping) and keeps
track of the cursor more accurately.
2023-03-01 20:59:35 -08:00
Mitchell Hashimoto
3b586c39c5
screen: grow cols before rows to handle reflow (tested)
2023-03-01 19:45:39 -08:00
Mitchell Hashimoto
74f0e38b57
screen: only trim if we're not wrapping on col growing
2023-03-01 17:42:46 -08:00
Mitchell Hashimoto
9a4a138da0
screen: don't wrap empty-char stylized cells on shrinking cols
2023-03-01 17:34:17 -08:00
Mitchell Hashimoto
31ac3ec7ba
screen: when expanding cols, broadcast empty styled cells
2023-03-01 17:24:24 -08:00
Mitchell Hashimoto
89138cf7e3
screen: don't trim blank lines if rows aren't changing
2023-03-01 17:09:57 -08:00
Mitchell Hashimoto
b4d8419feb
screen: trim trailing no-character cells when rows is changing
...
This matches Terminal.app, and makes it so the `ESC [ J` doesn't
generate scrollback on rows change.
2023-03-01 17:07:07 -08:00
Mitchell Hashimoto
d4057522ee
screen: resize more rows preserves soft wrapped flag
2023-03-01 09:18:26 -08:00
Mitchell Hashimoto
5f9ab91466
screen: fix issue with resizing w/ more cols, reflow, and scrollback
2023-03-01 09:08:08 -08:00
Mitchell Hashimoto
1970a84960
screen: when resizing and trimming scrollback, have to offset cursor Y
...
When the scrollback is trimmed off the top, the y stops moving. This
would cause an assertion failure because y could be greater than the row
count! The test case tests this.
2023-02-28 22:28:27 -08:00
Mitchell Hashimoto
87e0f5589f
screen clone should not make full requested height "written"
...
Previously, the screen clone would incidentally mark the full height as
"written" which would cause resize to create scrollback because it was
trying to preserve prior rows. A clone should not "write" any data. This
modifies the clone operation to create a screen with the correct height
but only copy data actually written.
2023-02-28 17:10:28 -08:00
Mitchell Hashimoto
ce86c64b42
update zig, src for loops
2023-02-27 21:46:42 -08:00
Mitchell Hashimoto
4fae29ff13
terminal: scrollRegionUp outside of range does nothing
2022-12-14 21:43:47 -08:00
Mitchell Hashimoto
c7a28fab20
terminal: don't crash if cell claims to have grapheme but doesn't
2022-12-14 21:19:23 -08:00
Mitchell Hashimoto
29cc8312d5
revert
2022-11-27 21:45:10 -08:00
Mitchell Hashimoto
4a3376d916
fix crash with cursor going off screen on resize
2022-11-27 21:06:11 -08:00
Mitchell Hashimoto
584149121d
use enum for underline styles
2022-11-27 14:16:51 -08:00
Mitchell Hashimoto
3fbeca914b
terminal: fix possible crash when increasing columns in resize
...
If a cell has graphemes attached to it, we'd share the grapheme map.
This copies it.
2022-11-26 17:44:08 -08:00
Mitchell Hashimoto
d64b0e371e
terminal: copy grapheme map when resizing and ensure proper cleanup
2022-11-26 17:33:52 -08:00
Mitchell Hashimoto
70b017200a
copying selection trims trailing whitespace
...
This is configurable with `clipboard-trim-trailing-spaces`.
This also fixes a bug where debug builds would crash when copying blank
lines. This never affected release builds.
2022-11-22 21:27:05 -08:00
Mitchell Hashimoto
d1b565f4d4
hook up triple-click in UI to select lines
2022-11-22 10:07:52 -08:00
Mitchell Hashimoto
8b839ef4b6
screen selectLine and tests
2022-11-22 10:03:20 -08:00
Mitchell Hashimoto
04088abe5a
fix regression around selecting word at end of screen
2022-11-22 09:41:07 -08:00
Mitchell Hashimoto
a63815c5ba
selectWord goes across soft-wrapped lines
2022-11-22 08:04:27 -08:00
Mitchell Hashimoto
f7c6ea63e1
screen selectWord starting functionality, not done at all
2022-11-21 21:34:38 -08:00
Mitchell Hashimoto
a714ee2702
fix memory leak when grapheme clusters of >4 codepoints are present
2022-11-18 14:15:14 -08:00
Mitchell Hashimoto
69fdd57aa3
screen: support scroll region scrolling with circular buffer wraparound
2022-11-16 09:28:56 -08:00
Mitchell Hashimoto
feccd550c3
implement many more reset sgr attributes
2022-11-13 21:54:26 -08:00
Mitchell Hashimoto
019f1e34bb
metal: copy screen data (see opengl commit for why)
2022-11-13 17:29:23 -08:00
Mitchell Hashimoto
3fcdd9a196
fix outdated test
2022-11-13 16:25:50 -08:00
Mitchell Hashimoto
f1c69343d3
opengl: copy screen data instead of sharing state
...
Through benchmarking I've determined this lowers lock contention by
about 50% on the critical data.
2022-11-13 16:16:08 -08:00
Mitchell Hashimoto
ce85d9a2cd
add more tracing, unroll a loop
2022-11-08 19:15:14 -08:00