package home import ( "github.com/charmbracelet/bubbles/key" tea "github.com/charmbracelet/bubbletea" "sevenkeys/tui" ) func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { var cmd tea.Cmd switch msg := msg.(type) { case tea.WindowSizeMsg: m.WindowHeight = msg.Height m.WindowWidth = msg.Width m.Help.Width = msg.Width return m, nil case tea.KeyMsg: switch { case key.Matches(msg, tui.KeyMap.Quit): return m, tea.Quit } break } return m, cmd }