Kovid Goyal
0037e3a97d
Add parse test for CSI 14;2 t
2025-11-24 11:23:21 +05:30
Wukuyon
65890de60d
Fix UTF-8 overlong and special range checks in simd-string-impl.h
...
Modified `start_classification` in `utf8_decode_to_esc` in `simd-string-impl.h`, which now:
Rejects `0xC0`, `0xC1` and `0xF5..0xFF` lead bytes in UTF-8 subsequences.
Enforces special ranges for the second subsequence bytes after `0xE0`, `0xED`, `0xF0` and `0xF4` bytes to prevent overlong sequences, surrogates, and code points above U+10FFFF.
Accumulates UTF-8 validation errors in a single vector to avoid many conditional branches.
Worsens unicode benchmark performance by about 4%.
2025-10-23 22:37:33 -06:00
Wukuyon
295951348c
Add boundary case tests for test_utf8_simd_decode
...
These tests were generated from Node.js and match the WHATWG Encoding Specification's behavior (substitution of maximal subparts).
2025-10-23 21:43:20 -06:00
Wukuyon
77a3fc8dd2
Swap expected/actual variables in t function in test_utf8_simd_decode
...
For more useful debugging.
The expected value is what the scalar decoder returns.
The actual value is what the "which" SIMD decoder returns.
2025-10-23 21:43:20 -06:00
Kovid Goyal
3d0ec1c684
Only skip invalid UTF8 tests when actually using SIMD
2025-09-15 08:59:03 +05:30
Kovid Goyal
5d9a28f7a1
Move utf8_parsing tests to simd_decode
...
More robust as the tests are run against all three SIMD modes, no SIMD,
128bit and 256 bit
2025-09-15 08:53:03 +05:30
Kovid Goyal
42aa5957a5
Comment out all the failing invalid UTF-8 tests
2025-09-15 08:43:58 +05:30
Wukuyon
542c425488
test_utf8_parsing: Add more tests for UTF-8 maximal subpart replacement
2025-09-14 16:50:38 -06:00
Wukuyon
346384351e
test_utf8_parsing: Add comments describing each assertion
2025-09-14 16:33:53 -06:00
Kovid Goyal
45b2678db1
Allow backspace to wrap cursor to previous line
...
Fixes #8841
2025-07-23 08:56:54 +05:30
Kovid Goyal
d1938cb060
Fix failing test
2025-04-08 13:07:59 +05:30
Kovid Goyal
eb5a9bc6a3
...
2025-02-18 19:02:32 +05:30
Kovid Goyal
5c2c88858b
Implement reporting of multicell commands
2025-02-03 10:56:45 +05:30
Kovid Goyal
1ed4a349be
Clearance of multicell tests
2025-02-03 10:56:43 +05:30
Kovid Goyal
d68e49fe64
Start work on refactoring notifications handling
...
Makes the code cleaner and easily mockable for testing.
Also, add code to handle closing notifications on Linux.
2024-07-25 06:45:10 +05:30
Kovid Goyal
7741799f78
Start work on implementing closing of notifications
2024-07-23 22:05:05 +05:30
Kovid Goyal
9484814c3f
Specify that unknown payload types should be ignored
2024-07-23 21:14:29 +05:30
Kovid Goyal
786b7aa7c7
Add tests for i=0 in responses when no id specified
2024-07-23 20:45:52 +05:30
Kovid Goyal
c4baed73a2
Forgot about supporting multiplexers in the desktop notification query protocol
2024-07-23 20:35:26 +05:30
Kovid Goyal
3cf6db445b
Also respond about urgency support in the query response
2024-07-23 20:24:18 +05:30
Kovid Goyal
e14894888c
Desktop notifications protocol: Add support for querying if the terminal emulator supports the protocol
...
Fixes #7658
2024-07-23 20:16:25 +05:30
Kovid Goyal
d9631cdedd
Port the notifications test to handle urgency
2024-05-16 21:45:15 +05:30
Kovid Goyal
8fa592d849
Parse and ignore SOS codes
...
Fixes #7184
2024-03-03 08:58:47 +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
e541c0534d
...
2024-02-25 09:57:42 +05:30
Kovid Goyal
41ec46d5bb
...
2024-02-25 09:57:42 +05:30
Kovid Goyal
b021e9b648
Do the default func test last so we can see what the failure is on more explicitly
2024-02-25 09:57:42 +05:30
Kovid Goyal
d0797a025b
Add dedicated tests for find_either_of_two
2024-02-25 09:57:42 +05:30
Kovid Goyal
6cdc7ac91d
A further 5% speedup for UTF-8 decoding
...
Achieved by decoding in larger chunks thereby amortizing the cost
of creating various constant vectors over larger chunks.
2024-02-25 09:57:40 +05:30
Kovid Goyal
dafb876d75
Skip simd parser tests on machines without SIMD instructions
2024-02-25 09:57:38 +05:30
Kovid Goyal
616fcfd201
More tests
2024-02-25 09:57:35 +05:30
Kovid Goyal
b3ca5d51fb
Use the new SIMD utf-8 decoder
2024-02-25 09:57:35 +05:30
Kovid Goyal
e783eccc97
fix handling of bits from high byte of 4 byte sequences
2024-02-25 09:57:35 +05:30
Kovid Goyal
fa3579656b
More invalid utf-8 tests
2024-02-25 09:57:34 +05:30
Kovid Goyal
8a10fcaf5a
More tests
2024-02-25 09:57:34 +05:30
Kovid Goyal
4c8b8caead
Handle trailing incomplete sequences
2024-02-25 09:57:34 +05:30
Kovid Goyal
4238fedee7
More tests
2024-02-25 09:57:34 +05:30
Kovid Goyal
b0dcdf74bd
More tests and micro-optimize switch to ASCII fast path
2024-02-25 09:57:34 +05:30
Kovid Goyal
b28fbf6817
fix zero-ing of last n bytes
2024-02-25 09:57:34 +05:30
Kovid Goyal
daa169b8ed
More work on utf8 SIMD decode
2024-02-25 09:57:34 +05:30
Kovid Goyal
b146e9c457
Add basic parser tests for pending mode activation/de-activation
2024-02-25 09:57:32 +05:30
Kovid Goyal
1f835b27c4
start work on implementing pending mode as paused rendering
2024-02-25 09:57:32 +05:30
Kovid Goyal
e52bcb5b93
more workon simd utf-8 decode
2024-02-25 09:57:31 +05:30
Kovid Goyal
74391d7c50
More work on SIMD utf-8 decode
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
200e5bf6e3
Examine 8 bytes at once for terminator char
2024-02-25 09:57:26 +05:30
Kovid Goyal
65aca5b140
Speedup utoi by loading numbers in 8 byte chunks
2024-02-25 09:57:24 +05:30
Kovid Goyal
e7c466797c
threading test for full buffer
2024-02-25 09:57:24 +05:30
Kovid Goyal
c66c0b8edc
threading tests for pending
2024-02-25 09:57:24 +05:30
Kovid Goyal
50935b6c93
Cleanup kitty dcs parsing
2024-02-25 09:57:24 +05:30