remove cruft from previous example

This commit is contained in:
decentral1se 2022-07-13 23:42:39 +02:00
parent dc09d8c1a5
commit e924189eaf
No known key found for this signature in database
GPG Key ID: 03789458B3D0C410

View File

@ -29,7 +29,6 @@ func handleCliFlags() {
type model struct {
manuals []string
cursor int
selected map[int]struct{}
}
func initialModel() model {
@ -41,7 +40,6 @@ func initialModel() model {
return model{
manuals: manuals,
selected: make(map[int]struct{}),
}
}
@ -77,13 +75,6 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if m.cursor < len(m.manuals)-1 {
m.cursor++
}
case "enter", " ":
_, ok := m.selected[m.cursor]
if ok {
// doing nothing!
} else {
m.selected[m.cursor] = struct{}{}
}
}
}