|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|