477 Commits

Author SHA1 Message Date
Mitchell Hashimoto
1028fe1c56 terminal: only call new method 2024-08-17 22:02:48 -07:00
Mitchell Hashimoto
adb382f1c8 terminal: call new method for scroll operation 2024-08-17 22:00:52 -07:00
Mitchell Hashimoto
a125dc9682 terminal: add more tests for index, verified that l/r margin handling is
good
2024-08-17 20:01:47 -07:00
Mitchell Hashimoto
1d7e87c88d terminal: index from bottom row of scroll region always makes scrollback
Ghostty previously incorrectly only created scrollback if the top/bot
margins were the full height of the viewport. The actual xterm behavior
is to create scrollback as long as the top margin is the top row and the
cursor is on the bottom margin (wherever that may be).
2024-08-17 10:58:34 -07:00
Łukasz Niemier
f9be02a20f chore: clean up typos 2024-08-05 13:56:57 +02:00
Mitchell Hashimoto
d40101fea0 terminal: more tests 2024-07-31 09:51:32 -07:00
Mitchell Hashimoto
3549619a64 terminal: introduce row bit for kitty virtual placeholders 2024-07-25 21:32:45 -07:00
Mitchell Hashimoto
deacb10fb1 terminal: print must use codepoint() now to work with placeholders 2024-07-25 21:32:44 -07:00
Mitchell Hashimoto
2c0f9bfc28 terminal: cell returns empty for Kitty placeholder
So we don't render the replacement char
2024-07-25 21:32:44 -07:00
Mitchell Hashimoto
902913554b terminal: printing over a cell with the same hyperlink keeps flag
Fixes #1990

This fixes and adds a unit test for an edge case where when printing
over the same cell with the same hyperlink ID, we were unsetting the
cell hyperlink state.

This commit also adds a number of integrity checks to verify hyperlinks
remain in a consistent state.
2024-07-23 16:00:09 -07:00
Qwerasd
730185b212 terminal: spacer heads and tails should be codepoint 0, not ' ' 2024-07-08 22:25:39 -04:00
Mitchell Hashimoto
251ec0c9f3 terminal: on print, adjust page size if we need to grow for hyperlinks 2024-07-05 21:40:40 -07:00
Mitchell Hashimoto
ff9ab70091 terminal: end hyperlink state when switching screens 2024-07-05 21:40:39 -07:00
Mitchell Hashimoto
f920068ce6 terminal: full reset clears OSC8 state 2024-07-05 21:40:38 -07:00
Mitchell Hashimoto
d9e654da4a terminal: scrollUp hyperlink tests 2024-07-05 21:40:38 -07:00
Mitchell Hashimoto
84edaed690 terminal: scrollDown with hyperlinks 2024-07-05 21:40:38 -07:00
Mitchell Hashimoto
bac1307c4b terminal: index hyperlink tests 2024-07-05 21:40:38 -07:00
Mitchell Hashimoto
96ff17a9b4 terminal: save/restore cursor doesn't modify hyperlink state 2024-07-05 21:40:38 -07:00
Mitchell Hashimoto
57c5522a6b terminal: handle moving/swapping/clearing cells with hyperlinks 2024-07-05 21:40:38 -07:00
Mitchell Hashimoto
e2133cbd92 terminal: row needs hyperlink state, test clearing hyperlink 2024-07-05 21:40:38 -07:00
Mitchell Hashimoto
a3a445a066 terminal: print sets hyperlink state, tests 2024-07-05 21:40:38 -07:00
Qwerasd
93b038f490 fix(RefCountedSet): add NeedsRehash error and fix PSL counting bug
Prevent bad input from causing repeated OutOfMemory errors by erroring
with NeedsRehash instead when there are unused dead IDs available.

Additionally, properly decrement PSL stats when reviving dead IDs.
2024-06-24 20:32:22 -07:00
Qwerasd
9741b3a18c perf: introduce RefCountedSet structure, use it for Style.Set 2024-06-13 22:59:03 -04:00
Mitchell Hashimoto
0d94fb61c9 terminal: all cursor movement needs to mark the old and new page dirty 2024-06-07 15:03:02 -07:00
Mitchell Hashimoto
c2b0bb6395 terminal: mark old/new rows as dirty when moving the cursor absolute 2024-06-07 14:55:02 -07:00
Mitchell Hashimoto
0335b0eada core: preedit modification sets full screen dirty
Fixes #1735
2024-05-07 19:19:58 -07:00
Mitchell Hashimoto
bb138becc5 terminal: resize causes full screen redraw 2024-05-01 20:31:49 -07:00
Mitchell Hashimoto
037f8d3a5e terminal: set dirty bit for screen swap 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
11c195e493 terminal: dirty tracking on print with tests 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
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
eb2a2e3931 fmt 2024-04-02 08:38:51 -07:00
Qwerasd
51d3c2cf35 fix(kitty_graphics): set dirty state on various scroll operations 2024-03-31 21:49:28 -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
Mitchell Hashimoto
dce96847a9 terminal: test eraseRowBounded, fix off by ones 2024-03-27 20:23:45 -07:00