89 Commits

Author SHA1 Message Date
Kovid Goyal
812fe467c9 Report OSC 6/106 as ignored only once 2025-03-09 19:02:19 +05:30
Kovid Goyal
dfd337edf3 Better error message for some more unhandled OSC codes 2025-03-09 18:55:54 +05:30
Kovid Goyal
e825ae4858 Document a whole bunch of OSC codes used by other projects in the parser 2025-02-27 10:49:09 +05:30
Kovid Goyal
4fb61ac8f3 Better error message for OSC 666 2025-02-26 09:43:27 +05:30
Kovid Goyal
375583259a Fix --hold always restoring cursor to block shape instead of respecting the value of cursor_shape 2025-02-18 20:21:07 +05:30
Kovid Goyal
5c2c88858b Implement reporting of multicell commands 2025-02-03 10:56:45 +05:30
Kovid Goyal
b1c80d212f Allow non-width multicell code to fill multiple cells using native width algo 2025-02-03 10:56:44 +05:30
Kovid Goyal
540e030f96 Start work on handling multicell escape code 2025-02-03 10:56:43 +05:30
Kovid Goyal
643e534053 Do not call monotonic() when changing cursor position
monotonic() is extremely slow. This call was halving the CSI parsing
speed benchmark. Instead we use the time at which parsing of the current
input chunk was started. This should be within a few microseconds and
accurate enough for the cursor trail for which it is used.
2025-01-17 21:41:02 +05:30
Kovid Goyal
0ecbc2b786 Only log an error about modifyOtherKeys if the application attempts to turn it on without first turning on the kitty keyboard protocol 2025-01-16 20:30:09 +05:30
Kovid Goyal
deff40df8a New OSC 21 protocol for color control
Needs to be specced up
2024-07-22 10:57:13 +05:30
Kovid Goyal
53122ea460 Fix #7458 2024-05-21 07:47:51 +05:30
Kovid Goyal
8fa592d849 Parse and ignore SOS codes
Fixes #7184
2024-03-03 08:58:47 +05:30
Kovid Goyal
cf49fcc4e9 Make --dump-bytes robust against parser code modifying contents of buffer during parsing 2024-02-25 09:57:45 +05:30
Kovid Goyal
06dd84d6da Ensure event loop ticks ASAP when there is pending input 2024-02-25 09:57:45 +05:30
Kovid Goyal
dd3d4f8451 ... 2024-02-25 09:57:44 +05:30
Kovid Goyal
c08523a1ad Fix --dump-bytes duplicating bytes because of input_delay 2024-02-25 09:57:44 +05:30
Kovid Goyal
4caf8a6b14 Restore support for alternate character sets
Needed by the execrable ncurses. Adds an extra branch in the hot path,
sigh. Thanks to branch prediction it doesnt have any measurable impact
on the benchmark, thankfully.
2024-02-25 09:57:44 +05:30
Kovid Goyal
9cb9373274 Allow unbounded output in UTF8Decoder
This will allow us to eventually decode more than a single
vector's worth in a fast inner loop
2024-02-25 09:57:39 +05:30
Kovid Goyal
b560fe34c9 Give the functions for creating various objects unique names so they are easily recognized in macOS's non-fully-symolicated crash reports 2024-02-25 09:57:37 +05:30
Kovid Goyal
c98b9403ac Dynamically allocated parser state should be 64 byte aligned as well 2024-02-25 09:57:35 +05:30
Kovid Goyal
1f835b27c4 start work on implementing pending mode as paused rendering 2024-02-25 09:57:32 +05:30
Kovid Goyal
532cc44e66 Ensure screen is always set when calling parse_sgr 2024-02-25 09:57:32 +05:30
Kovid Goyal
96bcb1d33b Fix handling on new_input_at 2024-02-25 09:57:32 +05:30
Kovid Goyal
7f60c649f4 ... 2024-02-25 09:57:31 +05:30
Kovid Goyal
8975d1a9f4 no need to parametrize sentinel 2024-02-25 09:57:31 +05:30
Kovid Goyal
48bf8c6105 Report out of single byte control code embedded in CSI 2024-02-25 09:57:31 +05:30
Kovid Goyal
0ed1c6f840 Simplify utf8 parser func
Also show a replacement char for incomplete utf-8 sequences interrupted by an esc char
2024-02-25 09:57:31 +05:30
Kovid Goyal
ba18c5a669 Move ByteLoader back to simd-string.c in preparation for getting rid of it 2024-02-25 09:57:31 +05:30
Kovid Goyal
293ad34535 Get rid of utoi() 2024-02-25 09:57:31 +05:30
Kovid Goyal
45e10394a0 Get rid of ByteLoader from csi_parse_loop
It benchmark's 4% slower on my machine
2024-02-25 09:57:31 +05:30
Kovid Goyal
0531b4bc79 Move too long CSI check out of parse loop 2024-02-25 09:57:30 +05:30
Kovid Goyal
718f4b328f Go back to a single code path for drawing text
Slightly reduces pure ASCII performance and improves Unicode
performance. We should be able to get pure ASCII performance back
via SIMD eventually.
2024-02-25 09:57:30 +05:30
Kovid Goyal
b41cf52ce4 ensure no control chars are drawn 2024-02-25 09:57:29 +05:30
Kovid Goyal
e08e15a676 Ensure parser buffer is aligned to 64 bytes 2024-02-25 09:57:29 +05:30
Kovid Goyal
2dffad1d8e Use byteloader for printable char ranges 2024-02-25 09:57:29 +05:30
Kovid Goyal
71bf099041 Speed up drawing of printable ascii chars 2024-02-25 09:57:28 +05:30
Kovid Goyal
e5675e9537 Simplify API 2024-02-25 09:57:28 +05:30
Kovid Goyal
c052831291 Dont double parse CSI digits 2024-02-25 09:57:28 +05:30
Kovid Goyal
fe2cd543ba Switch to same algorithm for 128bit SIMD as used for 256 bit SIMD
Avoids needing to write to the haystack and also less chance of a bug in
the never tested simd since all CPUs I have access to have AVX2
2024-02-25 09:57:28 +05:30
Kovid Goyal
021dd168e5 ... 2024-02-25 09:57:27 +05:30
Kovid Goyal
b032313c45 Only use SIMD if CPU supports it at runtime 2024-02-25 09:57:27 +05:30
Kovid Goyal
19a41b4d9a Use sse4.2 instruction for normal mode printable ascii detection 2024-02-25 09:57:27 +05:30
Kovid Goyal
25e7a2882d Work on using SIMD for normal mode dispatch 2024-02-25 09:57:27 +05:30
Kovid Goyal
23c42cb555 ... 2024-02-25 09:57:27 +05:30
Kovid Goyal
1f8feea454 Parse new data that is writtne while parsing is in progress in the parse loop
Avoids unnecessary memmove()
2024-02-25 09:57:27 +05:30
Kovid Goyal
ac6afcb0a8 Release the parser IO lock while parsing 2024-02-25 09:57:27 +05:30
Kovid Goyal
89d416806b ... 2024-02-25 09:57:26 +05:30
Kovid Goyal
8b4209cb97 Also use fast find for pending mode 2024-02-25 09:57:26 +05:30
Kovid Goyal
f4819175b0 Start work on vectorizing searches 2024-02-25 09:57:26 +05:30