Avoid unnecessary conversions

This commit is contained in:
Christian Muehlhaeuser 2020-08-22 12:41:37 +02:00
parent 9a4fbb3be1
commit f78a02cc29
No known key found for this signature in database
GPG Key ID: 3CF9FA45CA1EBB7E

View File

@ -267,7 +267,7 @@ func (m *Model) wordRight() {
i := m.pos
for i < len(m.value) {
if unicode.IsSpace(rune(m.value[i])) {
if unicode.IsSpace(m.value[i]) {
m.pos++
i++
} else {
@ -276,7 +276,7 @@ func (m *Model) wordRight() {
}
for i < len(m.value) {
if !unicode.IsSpace(rune(m.value[i])) {
if !unicode.IsSpace(m.value[i]) {
m.pos++
i++
} else {