summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-04-05 00:53:34 +1000
committerJesse Duffield <jessedduffield@gmail.com>2021-04-06 19:34:32 +1000
commit952c62df37f839004a80fa393f4ddb42683fc41f (patch)
tree974c8b5326df112104d1691e3f5cf97fa95a8df7 /vendor
parentb6cc1c949221810966b3c3cb4a386dc6c7faa023 (diff)
fix bug where searching through view got stuck if you went over the upper bound
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/jesseduffield/gocui/view.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go
index 4e4de080d..b13074242 100644
--- a/vendor/github.com/jesseduffield/gocui/view.go
+++ b/vendor/github.com/jesseduffield/gocui/view.go
@@ -170,7 +170,7 @@ func (v *View) gotoNextMatch() error {
if len(v.searcher.searchPositions) == 0 {
return nil
}
- if v.searcher.currentSearchIndex == len(v.searcher.searchPositions)-1 {
+ if v.searcher.currentSearchIndex >= len(v.searcher.searchPositions)-1 {
v.searcher.currentSearchIndex = 0
} else {
v.searcher.currentSearchIndex++