summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-11-02 21:33:22 +1100
committerJesse Duffield <jessedduffield@gmail.com>2021-11-05 07:58:21 +1100
commit06ca71e955d58128773e2ab4b5db173b4609497f (patch)
tree4610247a0ed695a039779c60aa79405395a3558a /vendor
parent308a3b51b39227e4d14d330a8c285bcf2a18ebc9 (diff)
fix bug
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/jesseduffield/gocui/view.go7
-rw-r--r--vendor/modules.txt2
2 files changed, 5 insertions, 4 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go
index 4edc5a58d..887a5c7fe 100644
--- a/vendor/github.com/jesseduffield/gocui/view.go
+++ b/vendor/github.com/jesseduffield/gocui/view.go
@@ -218,7 +218,7 @@ func (v *View) SelectSearchResult(index int) error {
}
y := v.searcher.searchPositions[index].y
- v.FocusPoint(0, y)
+ v.FocusPoint(v.ox, y)
if v.searcher.onSelectItem != nil {
return v.searcher.onSelectItem(y, index, itemCount)
}
@@ -227,10 +227,9 @@ func (v *View) SelectSearchResult(index int) error {
func (v *View) Search(str string) error {
v.writeMutex.Lock()
- defer v.writeMutex.Unlock()
-
v.searcher.search(str)
v.updateSearchPositions()
+
if len(v.searcher.searchPositions) > 0 {
// get the first result past the current cursor
currentIndex := 0
@@ -243,8 +242,10 @@ func (v *View) Search(str string) error {
}
}
v.searcher.currentSearchIndex = currentIndex
+ v.writeMutex.Unlock()
return v.SelectSearchResult(currentIndex)
} else {
+ v.writeMutex.Unlock()
return v.searcher.onSelectItem(-1, -1, 0)
}
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 66d582ce3..47c766c71 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -161,7 +161,7 @@ github.com/jesseduffield/go-git/v5/utils/merkletrie/filesystem
github.com/jesseduffield/go-git/v5/utils/merkletrie/index
github.com/jesseduffield/go-git/v5/utils/merkletrie/internal/frame
github.com/jesseduffield/go-git/v5/utils/merkletrie/noder
-# github.com/jesseduffield/gocui v0.3.1-0.20211102093457-be3a05cf7131
+# github.com/jesseduffield/gocui v0.3.1-0.20211102104458-40df0be5a474
## explicit
github.com/jesseduffield/gocui
# github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e