Qwerasd
9669332134
terminal: cursorResetWrap should not reset wrap_continuation
2024-09-06 17:57:14 -04:00
Mitchell Hashimoto
8f47581e22
terminal: add test for wide character on right margin boundary
2024-09-06 14:28:04 -07:00
Qwerasd
057f218c9e
perf(terminal): specialize splitCellBoundary
to cursor row
...
+ do some abstraction leakage in `cursorResetWrap`, since they're both
used in hot functions for TUI stuff so performance is important.
2024-09-06 13:26:57 -04:00
Qwerasd
8d12044f1d
Terminal: fix ECH & DCH wide char boundary cond. behavior
2024-09-06 12:35:11 -04:00
Qwerasd
04271c6a07
test(Terminal): test ECH wide char boundary conditions
2024-09-06 12:35:11 -04:00
Qwerasd
1692a82b33
test(Terminal): test DCH wide char boundary conditions
2024-09-06 12:35:11 -04:00
Mitchell Hashimoto
a6031efa04
terminal: DECALN must use clearRows to clear protected memory
2024-09-05 14:35:12 -07:00
Gregory Anders
df06697899
termio: send initial focus reports
...
When the focus reporting mode (1004) is enabled, send the current focus
state. This allows applications to track their own focus state without
first having to wait for a focus event (or query
it by sending a DECSET followed by a DECRST).
Ghostty's focus state is stored only in the renderer, where the termio
thread cannot access it. We duplicate the focus state tracking in the
Terminal struct with the addition of a new (1-bit) flag. We duplicate
the state because the renderer uses the focus state for its own purposes
(in particular, the Metal renderer uses the focus state to manage
its DisplayLink), and synchronizing access to the shared terminal state
is more cumbersome than simply tracking the focus state in the renderer
in addition to the terminal.
2024-09-04 22:13:52 -05:00
Mitchell Hashimoto
6aab430caf
terminal: disable slow safety tests in releasesafe
2024-08-31 21:14:12 -07:00
Mitchell Hashimoto
9d08ed32ee
terminal: make error sets more explicit, capture explicit errors
2024-08-31 10:31:38 -07:00
Qwerasd
3807ee34c1
terminal: handle clonePartialRowFrom errors in insert/deleteLines
...
Handle `clonePartialRowFrom` errors in `insertLines` and `deleteLines`
by adjusting page capacity. To do this, I've rewritten both functions
with a new way of iterating rows by moving a tracked pin up/down.
Benchmarks seem to indicate that this has no effect on performance.
2024-08-30 13:45:18 -04:00
Mitchell Hashimoto
6a2d57edfd
terminal: cursorCopy has option to not copy hyperlink
2024-08-28 09:41:57 -07:00
Qwerasd
a3fb96f543
this should be a doc comment
2024-08-27 01:23:29 -04:00
Qwerasd
38bb9b40a6
Terminal: release hyperlink before copying cursor when switching screen
...
To avoid an unnecessary copy.
2024-08-27 01:07:29 -04:00
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