Mitchell Hashimoto
0c81ca44b8
terminal/kitty: do not render blank virtual placement cells
2024-07-29 14:52:09 -07:00
Mitchell Hashimoto
39b915ac25
terminal/kitty: handle width-stretched
2024-07-29 14:42:27 -07:00
Mitchell Hashimoto
77ee2f413c
terminal: hasText no longer special cases kitty placeholders
2024-07-29 14:36:49 -07:00
Mitchell Hashimoto
5e9b871028
terminal/kitty: unit tests for unicode placements
2024-07-29 14:15:51 -07:00
Mitchell Hashimoto
359458b96a
terminal/kitty: switch to new placement math
2024-07-29 10:52:10 -07:00
Mitchell Hashimoto
0ebf14fd44
terminal/kitty: working on moving placement math here for testing
2024-07-29 10:39:18 -07:00
Mitchell Hashimoto
6d2e97a2f1
terminal: cursorChangePin needs to migrate hyperlink state
...
Fixes #2007
2024-07-28 14:17:38 -07:00
Mitchell Hashimoto
6668930b96
terminal: appendGrapheme should text for codepoint, not text
2024-07-26 12:24:35 -07:00
Mitchell Hashimoto
266033670d
terminal/kitty: support cells with no diacritics
2024-07-25 21:32:45 -07:00
Mitchell Hashimoto
3549619a64
terminal: introduce row bit for kitty virtual placeholders
2024-07-25 21:32:45 -07:00
Mitchell Hashimoto
91a6e70d1b
terminal/kitty: extra placement tests
2024-07-25 21:32:45 -07:00
Mitchell Hashimoto
1786502f15
terminal/kitty: working runs
2024-07-25 21:32:45 -07:00
Mitchell Hashimoto
cf6463fec0
terminal/kitty: preparing to build runs of placements
2024-07-25 21:32:44 -07:00
Mitchell Hashimoto
7c6ae90300
terminal/kitty: implement high bit image id parsing
2024-07-25 21:32:44 -07:00
Mitchell Hashimoto
578bfc8d23
terminal/kitty: parse image/placement id from style
2024-07-25 21:32:44 -07:00
Mitchell Hashimoto
13df93a1d0
temrinal/kitty: really basic row/col diacritic decoding
2024-07-25 21:32:44 -07:00
Mitchell Hashimoto
e656fe3b79
terminal/kitty: starting virtual placement iterator
2024-07-25 21:32:44 -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
bb1a9bf532
terminal/kitty: rename diacritics to unicode
2024-07-25 21:32:44 -07:00
Mitchell Hashimoto
f71afcab95
terminal/kitty: diacritic small tests
2024-07-25 21:32:44 -07:00
Mitchell Hashimoto
358b4ca896
terminal/kitty: parse relative placement fields
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
7d9e50353b
terminal/kitty: add virtual placeholders placements
2024-07-25 21:32:44 -07:00
Mitchell Hashimoto
a5c382633f
terminal/kitty: placements support location enum (only pin for now)
2024-07-25 21:32:43 -07:00
Mitchell Hashimoto
d29073d999
terminal/kitty: add graphics diacritics file
2024-07-25 21:32:43 -07:00
Mitchell Hashimoto
b103e31727
terminal: isBetween needs to fall through for matching y on top page
...
Regressed in 9198adcba3477ab521cf215f1f652813e32e1951
This was causing Kitty image intersection to break.
2024-07-25 21:32:28 -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
Mitchell Hashimoto
3b889438aa
terminal: page clone handles case where hyperlink can't dupe
...
Fixes #1991
To check if a hyperlink from another page is already present in our
page's set, we need to dupe the hyperlink struct. If the hyperlink is
already present in our page, this dupe is a waste and is freed.
In the case where the hyperlink is present AND we don't have enough
memory to dupe the hyperlink to check if its present, we'd previous
simply crash out and fail rendering. Debug builds would crash with
integrity errors.
This commit resolves the issue by falling back to a slow path when our
string allocation table is full and iterating over the hyperlink map to
check one by one if we have the hyperlink. This O(N) is much slower than
allocating (in this case) but N is usually low on top of this case being
rare.
A better solution would probably be to ensure we always have some % of
available space free in our string allocation table. This would result
in some wasteful page reallocs but would speed up the render loop. We
can look into that later.
2024-07-22 17:01:25 -07:00
Mitchell Hashimoto
a75ee29f2d
Merge pull request #1981 from injust/adjust-line
...
Add `adjust_selection` actions for `beginning_of_line` and `end_of_line`
2024-07-22 09:40:45 -07:00
Justin Su
64f9327a7d
Add unit tests
2024-07-21 23:24:11 -04:00
multifred
72c672adb7
Fix multiple deprecated names for zig lib/std
2024-07-22 00:07:17 +02:00
Justin Su
97bd46de7f
Add adjust_selection
actions for beginning_of_line
and end_of_line
2024-07-20 23:06:47 -04:00
Justin Su
3ad478044b
Fix some words
2024-07-20 23:04:24 -04:00
Mitchell Hashimoto
9198adcba3
terminal: Pin.isBetween broken logic
...
Two bugs:
1. If our pin is the top page, and self.y == top.y, then x will tell us
the answer. Before, we'd fall through.
2. If our pin is not the top or bottom, but the top == bottom, then we
can't possibly be between. Before, we'd incorrectly check the linked
list starting AFTER top.
2024-07-20 14:50:31 -07:00
Mitchell Hashimoto
1eb18895bf
Merge pull request #1964 from jparise/osc-133-secondary
...
terminal: differentiate OSC 133 continuation and secondary kinds
2024-07-18 21:39:23 -07:00
Mitchell Hashimoto
7a50d37bc2
Merge pull request #1962 from jparise/screen-clearprompt-continuation
...
terminal: test clearPrompt with a continuation
2024-07-18 09:30:26 -07:00
Jon Parise
a4bc98a031
terminal: differentiate OSC 133 continuation and secondary kinds
...
OSC 133 defines distinct continuation (c) and secondary (s) prompt
kinds. They're both treated as prompt continuations but have different
semantic meanings: `c` allows the user to "go back" and edit previous
lines, while `s` does not.
We don't (yet) handle this "editable" distinction, but this change makes
our OSC parser slightly more correct.
2024-07-18 09:09:00 -04:00
Jon Parise
9369a1a34b
terminal: test clearPrompt with a continuation
2024-07-17 20:41:46 -04:00
Mitchell Hashimoto
137ba66211
terminal: implement in-band size reports (Mode 2048)
...
https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83
2024-07-17 10:18:15 -07:00
Mitchell Hashimoto
360e4f690f
terminal/kitty: change graphics base64 decode to use simdutf
2024-07-16 20:21:09 -07:00
Mitchell Hashimoto
df088c67f4
terminal/tmux: block output notifications
2024-07-12 14:04:56 -07:00
Mitchell Hashimoto
057dc32c71
terminal/tmux: many more notifications
2024-07-12 11:57:37 -07:00
Mitchell Hashimoto
bc7bc15120
terminal/tmux: parse session-changed notification
2024-07-12 10:22:59 -07:00
Mitchell Hashimoto
8c3559ecff
terminal: move tmux control mode parsing out to dedicated file
2024-07-12 09:49:59 -07:00
Mitchell Hashimoto
1ea25c5c64
terminal: tmux parsing handles begin/end blocks
2024-07-11 20:53:50 -07:00
Mitchell Hashimoto
f4db5009d6
terminal: dcs state cleanup in deinit
2024-07-11 19:09:55 -07:00
Mitchell Hashimoto
88d055452b
terminal: tmux enter/exit
2024-07-11 19:02:33 -07:00
Mitchell Hashimoto
ff43609097
terminal: boilerplate for tmux control mode parsing
2024-07-11 18:58:25 -07:00
Mitchell Hashimoto
f375bf009c
terminal: all DCS events can produce a command
2024-07-11 18:53:42 -07:00
Mitchell Hashimoto
01e1538ad3
terminal: dcs put can return a command
2024-07-11 18:42:22 -07:00