1268 Commits

Author SHA1 Message Date
Mitchell Hashimoto
25d1e861ec terminal: page memory layout for uri/hyperlink data 2024-07-05 21:39:07 -07:00
Mitchell Hashimoto
6c7b7843e9 terminal: additional parse test cases 2024-07-05 21:39:07 -07:00
Mitchell Hashimoto
f8e74a563a terminal: parse osc8 end 2024-07-05 21:39:07 -07:00
Mitchell Hashimoto
58173c9df5 terminal: parse osc 8 hyperlink_start 2024-07-05 21:39:06 -07:00
Mitchell Hashimoto
dea8859e2c Merge pull request #1925 from ghostty-org/styleref
terminal: when adjusting page capacity, account for cursor ref counts
2024-07-05 21:38:54 -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
3fc08aa660 terminal/kitty: intersect cell deletion is 1-based 2024-07-05 19:08:33 -07:00
Mitchell Hashimoto
c02481530a terminal: Pin.isBetween incorrect if same y and same page 2024-07-05 19:06:57 -07:00
Mitchell Hashimoto
44c95cbf7d terminal/kitty: delete by column/row is one-indexed 2024-07-05 18:59:21 -07:00
Mitchell Hashimoto
f4eea71859 terminal/kitty: image dimensions off by one fix
We weren't counting the original x/y as width 1.
2024-07-05 18:58:56 -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
Mitchell Hashimoto
b62806360b terminal: add test for pagelist to clear styles 2024-06-24 20:58:11 -07:00
Mitchell Hashimoto
368960d76a use +% for overflow 2024-06-24 20:37:11 -07:00
Mitchell Hashimoto
44c75931b4 terminal: ref counted set count is const 2024-06-24 20:33:28 -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
35793ee7cc page integrity checks: detect zombie styles 2024-06-24 20:32:22 -07:00
Qwerasd
6f732cca55 RefCountedSet: use usize for cap to allow up to max Id+1 2024-06-24 20:32:22 -07:00
Qwerasd
a7e6f1a070 fix(terminal/PageList): clear cells in truncated rows during clone
Previously this was a memory leak, styles and graphemes in these rows
were never reclaimed.
2024-06-24 20:32:21 -07:00
Mitchell Hashimoto
53423f1071 0.13 conversions 2024-06-24 15:16:24 -07:00
Mitchell Hashimoto
d019bacb18 terminal: RefCountedSize should use usize for byte math
Related to #1873
2024-06-24 10:39:55 -07:00
Mitchell Hashimoto
af132a3838 Merge pull request #1872 from qwerasd205/various-performance
Various Performance Changes
2024-06-23 09:51:21 -07:00
Mitchell Hashimoto
eebc7d4c3a small stylistic changes 2024-06-23 09:44:54 -07:00
Mitchell Hashimoto
9271fd50b6 cache_table and ref_counted_set work on 32-bit machines 2024-06-22 20:45:30 -07:00
Qwerasd
9741b3a18c perf: introduce RefCountedSet structure, use it for Style.Set 2024-06-13 22:59:03 -04:00
Mitchell Hashimoto
279921b936 terminal: reject invalid DECSASD status code 2024-06-09 21:22:37 -04:00
Mitchell Hashimoto
e2b4ee99e5 terminal: add easy debug mode for stream debugging 2024-06-09 21:22:23 -04:00
Mitchell Hashimoto
fb7cbd69c0 core: consider any paste with bracketed paste closer unsafe
Thanks to: https://thejh.net/misc/website-terminal-copy-paste

If a paste has the ending sentinel value for a bracketed paste
("\x1b[201~") then the shell may start processing data faster. We now
consider this unsafe even if the `clipboard-paste-bracketed-safe`
setting is true.
2024-06-08 14:38:49 -07: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
54ccefe838 Merge pull request #1832 from rockorager/csiDispatch-alias
stream: remove redundant alias handling in csiDispatch
2024-06-06 18:40:35 -07:00
Tim Culverhouse
4eddd919ef stream: remove redundant alias handling in csiDispatch
The alias handling block only handles one alias, which is already
handled in the switch statement. Remove this block and rename all
references to 'action' back to 'input'.
2024-06-06 20:15:58 -05:00
Mitchell Hashimoto
86322db991 terminal: point coord y needs to be a larger int
See comment.
2024-06-03 14:25:37 -07:00
Mitchell Hashimoto
41afb62903 very minor nitpicks 2024-05-25 14:19:23 -07:00
Jan200101
94a7166028 terminal: support using the bright palette for bold text 2024-05-25 16:58:19 +02:00
Mitchell Hashimoto
0335b0eada core: preedit modification sets full screen dirty
Fixes #1735
2024-05-07 19:19:58 -07:00
Mitchell Hashimoto
cd42888182 terminal: eraseRows sets dirty bits 2024-05-07 10:38:27 -07:00
Mitchell Hashimoto
f975861891 terminal: maintain dirty bits when rotating rows on clone 2024-05-07 10:36:54 -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
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
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