Reset PrevSearchIndex when opening filter prompt

When opening a filter prompt, reset PrevSearchIndex to -1 to avoid
stale search state from a previous search/filter session.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jesse DuffieldandClaude Opus 4.6 authored and Stefan Haller committed 2026-03-07 20:04:31 +01:00
1 parent 60316388c0
commit ed9693ebcc
1 file changed
+2
@@ -33,6 +33,8 @@ func NewSearchHelper(
func (self *SearchHelper) OpenFilterPrompt(context types.IFilterableContext) error {
state := self.searchState()
state.PrevSearchIndex = -1
state.Context = context
self.searchPrefixView().SetContent(context.FilterPrefix(self.c.Tr))