Reset cursor and page positions when entering the search state

This commit is contained in:
Nicolas Martin 2020-10-28 02:50:47 +01:00 committed by Christian Rocha
parent aba133b7e6
commit 2131b255ef

View file

@ -495,6 +495,8 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) {
case "/":
m.hideStatusMessage()
m.paginator.Page = 0
m.index = 0
m.state = stashStateSearchNotes
m.searchInput.CursorEnd()
m.searchInput.Focus()