From 7f01c99f3792b6241b5fb6ab1473bf7d1ef319bf Mon Sep 17 00:00:00 2001 From: Drew Smirnoff Date: Tue, 21 Apr 2026 23:47:59 +0400 Subject: [PATCH] fix: encryption settings not working (#827) --- tui/settings_encryption.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tui/settings_encryption.go b/tui/settings_encryption.go index 4bcc46095b2c1fa2f72b9b882bb27e9efe8928e1..2be7ccb2d8a852f59519fe61442284a14c0824c4 100644 --- a/tui/settings_encryption.go +++ b/tui/settings_encryption.go @@ -34,6 +34,15 @@ func (m *Settings) updateEncryption(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) { } switch msg.String() { + case "esc": + // Clear inputs and return to menu + m.encPasswordInput.SetValue("") + m.encConfirmInput.SetValue("") + m.encPasswordInput.Blur() + m.encConfirmInput.Blur() + m.encError = "" + m.activePane = PaneMenu + return m, nil case "tab", "shift+tab", "down", "up": if msg.String() == "shift+tab" || msg.String() == "up" { m.encFocusIndex-- @@ -85,6 +94,15 @@ func (m *Settings) updateEncryption(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) { return SecureModeEnabledMsg{Err: err} } } + default: + // Forward input to focused textinput + var cmd tea.Cmd + if m.encFocusIndex == 0 { + m.encPasswordInput, cmd = m.encPasswordInput.Update(msg) + } else if m.encFocusIndex == 1 { + m.encConfirmInput, cmd = m.encConfirmInput.Update(msg) + } + return m, cmd } return m, nil }