Qwerasd
5138801b7b
comment
2024-09-06 18:03:56 -04:00
Qwerasd
9669332134
terminal: cursorResetWrap should not reset wrap_continuation
2024-09-06 17:57:14 -04: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
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
daa1755793
terminal/page: discriminate cloneFrom errors
...
Doing this makes it possible to appropriately handle a failed cloneFrom
operation by adjusting the correct part of the page capacity accordingly
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
170f55aa84
Screen: update cursorCopy
to handle hyperlink state
2024-08-27 01:07:29 -04:00
Qwerasd
cb1cb3526a
test(Screen): add failing tests for cursorCopy
hyperlink handling
2024-08-27 01:07:29 -04:00
Qwerasd
30bba9bf06
terminal: move refcount responsibility out of setHyperlink
...
avoids double counting in several places
2024-08-27 01:01:31 -04:00
Mitchell Hashimoto
9a287e1589
terminal: hyperlink state for cursor needs to be preserved on resize
...
When a screen is resized, the pages are generally reallocated. This
causes the cursor hyperlink state to be lost and ultimately the
hyperlink ref count is off by one.
The unit test in this commit showcases the issue very clearly. And you
can see we do this logic already for styles. We never copied it over for
hyperlinks.
2024-08-21 18:29:10 -04:00
Mitchell Hashimoto
37d19b3cef
Merge pull request #2109 from edmz/block_hollow
...
Config: cursor-style can bet set to block_hollow
2024-08-18 15:08:08 -07:00
Mitchell Hashimoto
18a8d2b01d
Minor changes, mainly commenting to clarify some behaviors
2024-08-18 15:05:31 -07:00
Mitchell Hashimoto
994514981f
terminal: handle case grow allocates but cursor is multiple pages back
2024-08-18 10:20:23 -07:00
Mitchell Hashimoto
602fea52ec
terminal: cursorScrollAbove handles case of no new page, prev page
2024-08-18 10:14:35 -07:00
Mitchell Hashimoto
9898489e25
terminal: add Screen.cursorScrollAbove and tests
2024-08-17 21:57:07 -07:00
Eduardo Dominguez
2e70ad20df
Config: cursor-style can bet set to block_hollow
...
`cursor-style` can now also be set to `block_hollow`, no other changes
in behaviour are added.
2024-08-16 15:25:44 -06:00
Qwerasd
c37ee6c428
fix(terminal): proper style cleanup in cursorCopy
...
Old implementation sometimes resulted in an attempt to free the style
from a different page than it originates. This way is also generally
cleaner.
2024-08-15 19:08:12 -04:00
Qwerasd
16284dbb3f
test(terminal/Screen): add failing unit test for cursorCopy
...
Detects issue with style reference counting when the cursor is moved
across pages during the copy.
2024-08-15 19:06:41 -04:00
Łukasz Niemier
f9be02a20f
chore: clean up typos
2024-08-05 13:56:57 +02:00
Mitchell Hashimoto
09e367fe09
Merge pull request #2015 from ghostty-org/kitty-unicode
...
Kitty Graphics Unicode Placeholders
2024-07-31 09:56:12 -07:00
Mitchell Hashimoto
6d2e97a2f1
terminal: cursorChangePin needs to migrate hyperlink state
...
Fixes #2007
2024-07-28 14:17:38 -07:00
Mitchell Hashimoto
3549619a64
terminal: introduce row bit for kitty virtual placeholders
2024-07-25 21:32:45 -07:00
Jon Parise
9369a1a34b
terminal: test clearPrompt with a continuation
2024-07-17 20:41:46 -04:00
Qwerasd
6f1a2d1e8e
terminal/Screen: fix trailing blank cell handling for wrapped rows in dumpString
2024-07-08 22:26:36 -04:00
Mitchell Hashimoto
4a861a8c8f
terminal: hyperlink capacity adjustment needs to call safe variant
2024-07-06 08:47:22 -07:00
Mitchell Hashimoto
d79bbaac68
terminal: adjustCapacity handles hyperlink state
2024-07-05 21:44:30 -07: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
925ad5b45c
renderer: match multiple lines for osc8
2024-07-05 21:40:39 -07:00
Mitchell Hashimoto
961a4b6b31
terminal: support page oom with hyperlinks
2024-07-05 21:40:39 -07:00
Mitchell Hashimoto
57c5522a6b
terminal: handle moving/swapping/clearing cells with hyperlinks
2024-07-05 21:40:38 -07:00
Mitchell Hashimoto
c880bb6f45
terminal: test hyperlink reuse shares ID
2024-07-05 21:40:37 -07:00
Mitchell Hashimoto
d1f41e2035
terminal: hyperlink start/end on screen
2024-07-05 21:39:55 -07:00
Mitchell Hashimoto
a71b487d58
terminal: add strings table to page
2024-07-05 21:39:07 -07:00
Mitchell Hashimoto
92ffa9af13
terminal: when adjusting page capacity, account for cursor ref counts
...
This fixes an issue where when we adjusted the capacity of the page, the
style ref count would be off by one (short by one).
The issue is that when adjusting the capacity of a page, it happens on
PageList which is unware of cursor state and therefore can't ensure to
reference the active style.
This creates an `adjustCapacity` call on `Screen` which can properly
handle this scenario.
2024-07-05 21:33:05 -07:00
Mitchell Hashimoto
1a22bc7f3b
terminal: if cloned screen is subset of selection, select full screen
...
Fixes #1859
2024-06-25 09:45:36 -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
a1372a0efd
terminal: more dirty tracking
2024-05-07 09:55:32 -07:00
Mitchell Hashimoto
3cfce658c3
terminal: dirty tracking in more places, tests coverage
2024-05-07 09:52:03 -07:00
Mitchell Hashimoto
d3abe65ad6
terminal: only set selection dirty to true on clear if previously set
2024-05-06 18:35:51 -07:00
Mitchell Hashimoto
7c9ce0af73
terminal: Screen selection marks dirty
2024-05-01 20:41:53 -07:00
Mitchell Hashimoto
fb25f5cea1
terminal: more dirty tests
2024-05-01 20:31:49 -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
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
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