Do not quit TUI, if 'q' is pressed on specific pages (#4356)

* Do not quit TUI, if 'q' is pressed on Analyze Form page

* quit for specific pages only
This commit is contained in:
Kashif Khan
2025-07-31 22:21:21 +05:00
committed by GitHub
parent 715309a32e
commit 9df896bc25
+3 -1
View File
@@ -142,7 +142,9 @@ func (ui *TUI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case tea.KeyMsg:
switch {
case key.Matches(msg, ui.common.KeyMap.Help):
case key.Matches(msg, ui.common.KeyMap.CmdQuit) && ui.activePage() != sourceConfigurePage:
case key.Matches(msg, ui.common.KeyMap.CmdQuit) &&
(ui.activePage() == wizardIntroPage || ui.activePage() == analyzeKeysPage || ui.activePage() == sourceSelectPage):
ui.args = nil
return ui, tea.Quit
case key.Matches(msg, ui.common.KeyMap.Quit):