summaryrefslogtreecommitdiff
path: root/internal/client/ui/viminput/helpers.go
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2024-12-14 17:29:18 +0200
committerKyren223 <Kyren223@proton.me>2024-12-14 17:29:18 +0200
commitfeacef91b8114209bd9a87072930a02eb839ce9e (patch)
tree0a19f4a8e019da7274583a290be826faffb2d825 /internal/client/ui/viminput/helpers.go
parent9c4d6d4616946bdba5f23b267b812856cd2cf75c (diff)
Reverted last bug fix, it was a wrong fix that caused a different bug,
the root cause was the SearchChar function which was fixed in this commit
Diffstat (limited to 'internal/client/ui/viminput/helpers.go')
-rw-r--r--internal/client/ui/viminput/helpers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/client/ui/viminput/helpers.go b/internal/client/ui/viminput/helpers.go
index 92bfa4e..3bbcd11 100644
--- a/internal/client/ui/viminput/helpers.go
+++ b/internal/client/ui/viminput/helpers.go
@@ -34,7 +34,7 @@ func SearchChar(line []rune, i, dir int, c rune) (index int, ok bool) {
func SearchCharFunc(line []rune, i, dir int, f func(c rune) bool) (index int, ok bool) {
found := false
- for i > 0 && i < len(line) {
+ for i >= 0 && i < len(line) {
if f(line[i]) {
found = true
break