mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
text: fix editBuffer.runeBefore
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -154,7 +154,7 @@ func (e *editBuffer) moveRight() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *editBuffer) runeBefore(idx int) (rune, int) {
|
func (e *editBuffer) runeBefore(idx int) (rune, int) {
|
||||||
if idx >= e.gapstart {
|
if idx > e.gapstart {
|
||||||
idx += e.gapLen()
|
idx += e.gapLen()
|
||||||
}
|
}
|
||||||
return utf8.DecodeLastRune(e.text[:idx])
|
return utf8.DecodeLastRune(e.text[:idx])
|
||||||
|
|||||||
Reference in New Issue
Block a user