diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2024-07-01 15:54:30 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-07-02 22:12:45 +0200 |
commit | 894c97e374092bc42425c701c6696f81b1a6aa32 (patch) | |
tree | c0b91338dcc677f2293d5d6c71fa9f582f0cff80 /GNUmakefile | |
parent | 00bbc188f0bd2bbec15752bce61605d5236f26c9 (diff) | |
download | aerc-894c97e374092bc42425c701c6696f81b1a6aa32.tar.gz |
ui: make textinput grapheme aware
The textinput widget operated on a slice of runes, and naively assumed
a rune was a "character". When deleting or navigating the cursor through
text which contains multi-codepoint characters (such as emoji), the
cursor index could desync and cause panics.
Use a slice of vaxis.Characters instead of runes to more accurately
reflect the index state of the cursor with respect to characters.
Fixes: https://todo.sr.ht/~rjarry/aerc/263
Reported-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'GNUmakefile')
0 files changed, 0 insertions, 0 deletions