~rockorager/shtc

590309e2d02ce2c9f9cab81a4f6c191b1b9d52a5 — Tim Culverhouse 11 months ago 4c6fa7b
fix: reset filtered properly on Escape

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
1 files changed, 1 insertions(+), 1 deletions(-)

M git/model.go
M git/model.go => git/model.go +1 -1
@@ 86,11 86,11 @@ func (m *Model) Update(msg vaxis.Msg) {
		case "Escape":
			m.filter.Content.Text = ""
			m.filtering = false
			m.filtered = m.repos
			if len(m.filtered) == 0 {
				return
			}
			repo := m.filtered[m.selected]
			m.filtered = m.repos
			for i, r := range m.repos {
				if repo.Name == r.Name {
					m.selected = i