From f78a02cc298037a7e651bfc557f227b4559fef8e Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 22 Aug 2020 12:41:37 +0200 Subject: [PATCH] Avoid unnecessary conversions --- textinput/textinput.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/textinput/textinput.go b/textinput/textinput.go index 801bf6a..aab800c 100644 --- a/textinput/textinput.go +++ b/textinput/textinput.go @@ -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 {