Kovid Goyal
d429f732e1
DRYer
2025-03-25 13:45:56 +05:30
Kovid Goyal
b66a763ddf
Use a 3 stage table for Unicode properties
...
Halves the data size and reduces source code size by 50x
Shows no significant runtime performance effect.
Allows for easily adding more properties to the table in the future
2025-03-25 13:16:59 +05:30
Kovid Goyal
9f7643078c
Use unicode multi-table for remaining hot path lookups
...
Results in a 15% improvement in the unicode throughput benchmark
2025-03-24 15:04:33 +05:30
Kovid Goyal
3d0e45ace8
Use the new multi-stage unicode table for wcwidth
2025-03-24 14:20:40 +05:30
Kovid Goyal
7697a1650d
Add is_emoji_presentation_base to char props table
2025-03-24 13:55:49 +05:30
Kovid Goyal
f02245af79
Also run gofmt on kittens subdir in CI
2025-03-23 20:26:10 +05:30
Kovid Goyal
c73f5ab8a0
...
2025-03-23 19:37:23 +05:30
Kovid Goyal
16f7380cb0
Implement grapheme segmentation in Go
2025-03-23 19:24:12 +05:30
Kovid Goyal
aa8c32006f
Implement grapheme seg algo in Go
2025-03-22 14:54:58 +05:30
Kovid Goyal
7e780a2294
CharProps data for Go
2025-03-22 13:18:09 +05:30
Kovid Goyal
9663f935fb
...
2025-03-22 11:56:56 +05:30
Kovid Goyal
583a858769
Use a multistage lookup table for grapheme segmentation
2025-03-22 11:50:04 +05:30
Kovid Goyal
9c1c141775
Start work on grapheme segmentation algorithm
2025-03-13 11:19:54 +05:30
Kovid Goyal
98f9a568ce
Add Extended_Pictographic property
2025-03-13 10:01:41 +05:30
Kovid Goyal
039af78785
Add Indic Conjunct Break data
2025-03-13 09:18:42 +05:30
Kovid Goyal
1ee0b3369d
Fix GBP generation
2025-03-13 08:37:52 +05:30
Kovid Goyal
9cb56c2775
Run gofmt on grapheme-segmentation-data
2025-03-13 07:11:21 +05:30
Kovid Goyal
dc625c5e0c
Add grapheme break properties when generating wcwidth data
2025-03-13 07:06:46 +05:30
Kovid Goyal
af8605dabf
bump unicode version to 16
2024-11-10 09:03:52 +05:30
Kovid Goyal
911c80aa3b
More linter fixes
2023-09-22 12:20:37 +05:30
Kovid Goyal
49ea26968c
Bump go version to 1.21
...
Allows us to use the much faster builtin min/max functions
for two variable min/max
2023-08-09 11:58:16 +05:30
Kovid Goyal
2cae0ab695
Dont wait for cancel response when user denies permission
2023-07-30 19:49:46 +05:30
Kovid Goyal
05e10d8066
Also parse negative numbers in CSI
2023-03-29 15:12:22 +05:30
Kovid Goyal
e42b4fd9a6
Decrease allocs when wrapping
2023-03-27 07:53:54 +05:30
Kovid Goyal
07bab5253e
Update Unicode data
2023-02-09 09:45:42 +05:30
Kovid Goyal
e5e8cc72c6
Make the Unicode database version used available
2022-11-17 20:11:50 +05:30
Kovid Goyal
a2f022d166
Add support for the repeat escape code to TruncatetoVisualLength()
2022-11-17 08:17:11 +05:30
Kovid Goyal
d4c103e53e
zsh breaks when there are escape codes in completion descriptions
2022-11-16 19:32:16 +05:30
Kovid Goyal
ae93d95bbe
Get progress bar rendering working
2022-11-16 16:35:15 +05:30
Kovid Goyal
dd1fcf6855
Support the repeat prev char escape code when calculating the width of a string
2022-11-16 16:25:16 +05:30
Kovid Goyal
0068ae8f66
An easy to use iterator to iterate over the cells in a string
2022-11-14 15:42:06 +05:30
Kovid Goyal
5436408463
Fix the escape code parser not preserving complete utf-8 state between calls to ParseBytes()
...
Also allow it to be driven byte-by-byte
2022-11-14 15:42:06 +05:30
Kovid Goyal
834385baff
Improve performance when pasting large amounts of text into readline by not redrawing on every char
2022-11-14 15:42:05 +05:30
Kovid Goyal
6b04c42730
update wcswidth go version to match unicode 15 update in master
2022-11-14 15:42:03 +05:30
Kovid Goyal
8796168469
Port code to truncate strings to visual width to Go
2022-11-14 15:41:58 +05:30
Kovid Goyal
d16ad40bbf
avoid extra string copy in Stringwidth
2022-11-14 15:41:58 +05:30
Kovid Goyal
32804f01b2
Allow parsing strings with escape code parser
2022-11-14 15:41:55 +05:30
Kovid Goyal
80c5ac891d
Add license info to Go files
2022-11-14 15:41:51 +05:30
Kovid Goyal
c8292d77f1
Re-use the escape code parser for wcswidth calculation
2022-11-14 15:41:51 +05:30
Kovid Goyal
7280c712d6
Move escape code parser into wcswidth package
2022-11-14 15:41:50 +05:30
Kovid Goyal
5703a3370e
Move wcswidth into its own package as it is very slow to build
2022-11-14 15:41:50 +05:30