implement basic tab navigation
This commit is contained in:
parent
30fd110277
commit
05a79cd921
10
bubbletea.go
10
bubbletea.go
@ -35,6 +35,16 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.cursor++
|
||||
}
|
||||
|
||||
case "left", "h":
|
||||
if m.tab > 0 {
|
||||
m.tab--
|
||||
}
|
||||
|
||||
case "right", "l":
|
||||
if m.tab < 4 {
|
||||
m.tab++
|
||||
}
|
||||
|
||||
// The "enter" key and the spacebar (a literal space) toggle
|
||||
// the selected state for the item that the cursor is pointing at.
|
||||
case "enter", " ":
|
||||
|
Loading…
x
Reference in New Issue
Block a user