diff --git a/sevenkeys/tui/home.go b/sevenkeys/tui/home.go index 46a7527..f612984 100644 --- a/sevenkeys/tui/home.go +++ b/sevenkeys/tui/home.go @@ -141,6 +141,11 @@ func (m MainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { constants.WindowHeight = msg.Height constants.WindowWidth = msg.Width m.help.Width = msg.Width + case tea.KeyMsg: + switch { + case key.Matches(msg, m.keyMappings.Quit): + return m, tea.Quit + } case updateui.BackMsg: m.state = homeView } @@ -156,8 +161,6 @@ func (m MainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case key.Matches(msg, m.keyMappings.Search): m.state = searchView break - case key.Matches(msg, m.keyMappings.Quit): - return m, tea.Quit } break } diff --git a/sevenkeys/tui/updateui/updateui.go b/sevenkeys/tui/updateui/updateui.go index 6928478..dc86115 100644 --- a/sevenkeys/tui/updateui/updateui.go +++ b/sevenkeys/tui/updateui/updateui.go @@ -77,8 +77,6 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch { case key.Matches(msg, m.keyMappings.back): return m, backCmd() - case key.Matches(msg, m.keyMappings.quit): - return m, tea.Quit } } break