implement basic tab navigation
This commit is contained in:
parent
30fd110277
commit
05a79cd921
10
bubbletea.go
10
bubbletea.go
@ -34,6 +34,16 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||||||
if m.cursor < len(m.todos)-1 {
|
if m.cursor < len(m.todos)-1 {
|
||||||
m.cursor++
|
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 "enter" key and the spacebar (a literal space) toggle
|
||||||
// the selected state for the item that the cursor is pointing at.
|
// the selected state for the item that the cursor is pointing at.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user