mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-23 22:32:59 +03:00
Avoid unnecessary conversions
This commit is contained in:
parent
9a4fbb3be1
commit
f78a02cc29
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user