Use CharacterCount over RuneCount

This commit is contained in:
Zachary Yedidia
2020-05-20 16:47:08 -04:00
parent bdff221870
commit 79c0ea17ad
17 changed files with 64 additions and 83 deletions

View File

@@ -15,7 +15,6 @@ import (
"strings"
"sync"
"time"
"unicode/utf8"
luar "layeh.com/gopher-luar"
@@ -809,7 +808,7 @@ func (b *Buffer) MoveLinesUp(start int, end int) {
if end == len(b.lines) {
b.Insert(
Loc{
utf8.RuneCount(b.lines[end-1].data),
util.CharacterCount(b.lines[end-1].data),
end - 1,
},
"\n"+l,