diff --git a/bubbletea.go b/bubbletea.go index 87edd9e..c6133bd 100644 --- a/bubbletea.go +++ b/bubbletea.go @@ -34,6 +34,16 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if m.cursor < len(m.todos)-1 { 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. diff --git a/model.go b/model.go index 60e4f34..b19f42f 100644 --- a/model.go +++ b/model.go @@ -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 {