From f8dc99b15d60a82f2566fcf81ad1b64d2148b661 Mon Sep 17 00:00:00 2001 From: Christoper Hans <4262799+ChrHan@users.noreply.github.com> Date: Sat, 10 Sep 2022 08:00:10 +0700 Subject: [PATCH] fix(prompt): fix default selection of prompt, timer and exit code --- confirm/confirm.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/confirm/confirm.go b/confirm/confirm.go index 7e6eeb1..678e874 100644 --- a/confirm/confirm.go +++ b/confirm/confirm.go @@ -86,7 +86,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case tickMsg: if m.timeout <= 0 { m.quitting = true - m.confirmation = false + //m.confirmation = false return m, tea.Quit } m.timeout -= tickInterval @@ -107,8 +107,8 @@ func (m model) View() string { } if m.confirmation { - aff = m.selectedStyle.Render(m.affirmative) - neg = m.unselectedStyle.Render(m.negative + timeout) + aff = m.selectedStyle.Render(m.affirmative + timeout) + neg = m.unselectedStyle.Render(m.negative) } else { aff = m.unselectedStyle.Render(m.affirmative) neg = m.selectedStyle.Render(m.negative + timeout)