text: fix editBuffer.runeBefore

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-10-10 15:27:02 +02:00
parent 71731a613c
commit 163d9037e6
+1 -1
View File
@@ -154,7 +154,7 @@ func (e *editBuffer) moveRight() {
}
func (e *editBuffer) runeBefore(idx int) (rune, int) {
if idx >= e.gapstart {
if idx > e.gapstart {
idx += e.gapLen()
}
return utf8.DecodeLastRune(e.text[:idx])