diff options
-rw-r--r-- | ui/fuzzy-search-modal.go | 3 |
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() } |