aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/fuzzy-search-modal.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/fuzzy-search-modal.go b/ui/fuzzy-search-modal.go
index 5540760..30a9a92 100644
--- a/ui/fuzzy-search-modal.go
+++ b/ui/fuzzy-search-modal.go
@@ -135,6 +135,9 @@ func (fs *FuzzySearchModal) OnKeyEvent(event mauview.KeyEvent) bool {
case tcell.KeyBacktab:
if len(highlights) > 0 {
fs.selected = (fs.selected - 1) % len(fs.matches)
+ if fs.selected < 0 {
+ fs.selected += len(fs.matches)
+ }
fs.results.Highlight(strconv.Itoa(fs.matches[fs.selected].OriginalIndex))
fs.results.ScrollToHighlight()
}