1226 Commits

Author SHA1 Message Date
Mitchell Hashimoto
037f8d3a5e terminal: set dirty bit for screen swap 2024-05-01 20:31:49 -07:00
Mitchell Hashimoto
7e52f94278 terminal: on clone, only mark rows dirty that were previously dirty 2024-05-01 20:31:49 -07:00
Mitchell Hashimoto
d47f14f86a terminal: dirty tracking on screen clone 2024-05-01 20:31:49 -07:00
Mitchell Hashimoto
3f9e3c39a4 terminal: track dirty state of palette and reverse colors 2024-05-01 20:31:49 -07:00
Mitchell Hashimoto
f867fabf8e terminal: new coordinate type 2024-05-01 20:31:49 -07:00
Mitchell Hashimoto
fb25f5cea1 terminal: more dirty tests 2024-05-01 20:31:49 -07:00
Mitchell Hashimoto
cfcd16354a terminal: many more dirty checks 2024-05-01 20:31:49 -07:00
Mitchell Hashimoto
1c05939f17 terminal: deleteChars dirty 2024-05-01 20:31:49 -07:00
Mitchell Hashimoto
a53dbaaa31 terminal: more dirty tests 2024-05-01 20:31:48 -07:00
Mitchell Hashimoto
19ddbbc7d6 terminal: eraseRowBounded dirty tracking 2024-05-01 20:31:48 -07:00
Mitchell Hashimoto
0749b67832 terminal: index dirty tests one todo 2024-05-01 20:31:48 -07:00
Mitchell Hashimoto
b46e028069 terminal: scrollDown dirty tests 2024-05-01 20:31:48 -07:00
Mitchell Hashimoto
bd1a7d3db1 terminal: scrollDown dirty tests 2024-05-01 20:31:48 -07:00
Mitchell Hashimoto
58aa4cc10b terminal: dirty tests for insertLines 2024-05-01 20:31:48 -07:00
Mitchell Hashimoto
f7a57bd2c8 terminal: dirty tests on t/b/l/r margins 2024-05-01 20:31:48 -07:00
Mitchell Hashimoto
981f031951 terminal: remove unused debug log 2024-05-01 20:31:48 -07:00
Mitchell Hashimoto
11c195e493 terminal: dirty tracking on print with tests 2024-05-01 20:31:48 -07:00
Mitchell Hashimoto
7b750b7ed9 terminal: add dirty bits to the page structure 2024-05-01 20:31:48 -07:00
Mitchell Hashimoto
3f16234f72 terminal: Coordinate uses CellCountInt 2024-04-26 20:52:08 -07:00
Mitchell Hashimoto
15b7a37cf9 terminal: export Coordinate 2024-04-25 19:07:10 -07:00
Mitchell Hashimoto
1f09da02ad terminal: relax cell zero value default test 2024-04-18 14:09:11 -07:00
Mitchell Hashimoto
910c8cb04a terminal: another enum in a packed struct needs backing int 2024-04-17 20:50:50 -07:00
Mitchell Hashimoto
9ea78f981e terminal: index (LF) that scrolls scroll region preserves SGR
Fixes #1676

The comment in the diff explains. This is a regression that was not unit
tested properly in the old implementation prior to the paged-terminal
merge.
2024-04-13 21:31:41 -07:00
Mitchell Hashimoto
733ce19654 terminal: handle case where eraseRowBounded happens at top of page
Fixes #1677

If eraseRowBounded is called at the top of a page AND there is a tracked
pin at the top of the page, then we'd have an integer overflow. The test
case covers this and this adds a fix.
2024-04-13 20:45:39 -07:00
Qwerasd
be07856647 fix(terminal/Screen): selectionString multi-page
Corrected logic for detecting if the current row is the end of the
selection. Previous logic was faulty because when I calculated the
current page y incorrectly, not realizing that it was already
available as `y`.
2024-04-04 17:59:42 -04:00
Qwerasd
b03f80cadd terminal/Screen: improve selectionString page test
More readable (smaller) output when failing, catches more edge cases.
At the time of this commit, this test is failing. Changed primarily to
address the edge case that was missed before.
2024-04-04 17:44:06 -04:00
Qwerasd
8be145ec1f fix(terminal/Sreen): selectionString across pages
Newlines after rows should only be omitted on the final row of the
entire SELECTION, not on the final row of each page/chunk.
2024-04-03 20:03:25 -04:00
Qwerasd
fa5646e762 test(terminal/Screen): selectionString across page boundaries 2024-04-03 19:28:02 -04:00
Mitchell Hashimoto
eb2a2e3931 fmt 2024-04-02 08:38:51 -07:00
Qwerasd
04ec859925 terminal/kitty_graphics: update tests
Kitty Graphics command structures have been changed to hold decoded payloads not base64 strings.
2024-03-31 22:28:53 -04:00
Qwerasd
51d3c2cf35 fix(kitty_graphics): set dirty state on various scroll operations 2024-03-31 21:49:28 -04:00
Qwerasd
ca4b55b486 terminal/kitty_graphics: ignore base64 padding
Also move all base64 decoding to inside of the command parser.
2024-03-31 21:09:37 -04:00
Qwerasd
5dee7e1430 terminal/kitty_graphics: update outdated comments 2024-03-31 19:29:56 -04:00
Qwerasd
5b509f9295 test(terminal/Screen): clearRows with protected cells 2024-03-29 16:47:53 -04:00
Qwerasd
925c7e86a2 fix(terminal): insert/deleteLines boundary cond.s
Introduced a helper function for correctly handling boundary conditions
in insertLines and deleteLines. Also adds a whole host of tests for said
conditions in deleteLines, tests not duplicated for insertLines because
they both use the same helper function.
2024-03-29 16:29:27 -04:00
Qwerasd
20ab4ec01f fix(terminal): correct wrap logic in insert/deleteLines
Appropriately handles clearing spacer heads if shifted lines include rightmost column, and centralizes clearing of row wrap state for full width scrolling regions.
2024-03-29 13:12:52 -04:00
Qwerasd
e55f2daf90 perf(terminal): clear unprotected cells in spans
Previous behavior of clearing one at a time hit a page integrity assertion after clearing a wide character but not its tail. This fixes that and should also be - in theory - significantly more performant as well by identifying spans of unprotected cells and clearing them in bulk.
2024-03-29 13:08:38 -04:00
Qwerasd
5df5fb4a56 fix(terminal/stream): add SPA and EPA handlers 2024-03-28 20:05:10 -04:00
Mitchell Hashimoto
dce96847a9 terminal: test eraseRowBounded, fix off by ones 2024-03-27 20:23:45 -07:00
Mitchell Hashimoto
8d4f454e30 terminal: add integrity assertion that cursor pin matches x/y 2024-03-27 13:42:11 -07:00
Mitchell Hashimoto
050e6e4daa terminal: when growing rows, need to set rows before grow()
grow() will not prune pages that are needed for the active but that
requires an accurate self.rows. We were setting this too late.
2024-03-27 10:38:31 -07:00
Qwerasd
d17344b855 perf(terminal/page): @memset micro-optimization 2024-03-26 12:07:35 -06:00
Qwerasd
492e147e26 terminal: clean up some code and comments 2024-03-26 12:07:35 -06:00
Qwerasd
2274b8a912 fix(terminal): don't reset x when indexing in scroll region 2024-03-26 12:07:35 -06:00
Qwerasd
aadf795d28 fix(terminal): correctly use slow path for left/right scroll margin 2024-03-26 12:07:35 -06:00
Qwerasd
23d32e248e perf(terminal): fast-paths for scrolling regions 2024-03-26 12:07:35 -06:00
Qwerasd
d74ea89056 fastmem: rotateOnce 2024-03-26 12:07:35 -06:00
Qwerasd
ddd7f3e706 comments 2024-03-26 12:07:35 -06:00
Qwerasd
9df9c999a7 fix(terminal): clear erased rows
Clearing these rows is necessary to avoid memory corruption, but the
calls to `clearCells` in the first loop were redundant, since the rows
in question are included in the second loop as well.
2024-03-26 12:07:35 -06:00
Qwerasd
0a6ef3fda4 wip(terminal): Fast path for scroll regions 2024-03-26 12:07:35 -06:00