9b782190fa1f4489f6bbf514b6084ec164382a3b
The IME commit path (swipe-to-type, autocorrect replacement) sends a key.EditEvent with a Range that the editor ignored, causing the replaced region to be duplicated. Add Logic.HandleReplaceRange which deletes the rune range [start,end) and inserts text, converting rune indices to byte offsets (string path: utf8.DecodeRuneInString; chunked path: leading-byte scan). HandleKeyDown now routes key.EditEvent through it. Also fixes two pre-existing ChunkedBuffer correctness bugs the tests exposed: - Delete mis-computed the per-chunk end using a shrinking 'remaining' instead of the absolute end, corrupting multi-chunk deletes. - FullContent derived its chunk bound solely from fileLen, truncating in-memory chunks grown past the old bound by an insert. Adds ime_range_test.go covering insert/replace/delete, unicode, chunked, and swapped bounds. go test -race ./... green.
Description
A simple, high performance text editor.
50 MiB
Languages
Go
92.7%
Shell
4.7%
Java
1.1%
C
0.8%
Python
0.7%