fix: continue existing filter when entering filter mode

This commit is contained in:
2026-03-14 23:27:36 +02:00
parent 31330513f8
commit 561c98ae02

View File

@@ -47,7 +47,7 @@ type model struct {
cursor int // cursor position in filtered list
offset int // scroll offset for visible window
filter string
filterCursor int // cursor position within filter string
filterCursor int // cursor position within filter string
filterMode bool
filterRegex bool // true when filter is in regex mode
filterRegexErr error // non-nil when regex pattern is invalid
@@ -490,8 +490,7 @@ func (m *model) handleKeyPress(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
}
case "/":
m.filterMode = true
m.filter = ""
m.filterCursor = 0
m.filterCursor = len(m.filter)
case "?":
m.showHelp = true
case "y":