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 Duffield
2026-03-07 20:04:31 +01:00
committed by Stefan Haller
co-authored by Claude Opus 4.6
parent 60316388c0
commit ed9693ebcc
@@ -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))