implement basic tab navigation

This commit is contained in:
june 2025-03-08 11:48:39 +13:00
parent 30fd110277
commit 05a79cd921
Signed by untrusted user who does not match committer: breadone
GPG Key ID: FDC19FE143200483
2 changed files with 11 additions and 0 deletions

View File

@ -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", " ":

View File

@ -6,6 +6,7 @@ type todo struct {
deadline int
startdate int
priority int // 1-4, 1 being highest priority, 4 being no priority
isInbox bool
}
type model struct {