refactor: use ++/-- instead
This commit is contained in:
parent
d1c87cb316
commit
536ce28192
|
@ -242,13 +242,13 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
})
|
||||
|
||||
case "ctrl+n":
|
||||
m.menuState += 1
|
||||
m.menuState++
|
||||
if m.menuState > len(m.menuBar)-1 {
|
||||
m.menuState = 0
|
||||
}
|
||||
|
||||
case "ctrl+p":
|
||||
m.menuState -= 1
|
||||
m.menuState--
|
||||
if m.menuState < 0 {
|
||||
m.menuState = len(m.menuBar) - 1
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue