From 5006668df0d6fa4b12afbd7cf8ffdb5c573eb669 Mon Sep 17 00:00:00 2001 From: tauraamui Date: Mon, 24 Nov 2025 12:14:49 +0000 Subject: [PATCH] docs: add useful explanatory comment for fallback behaviour --- internal/tui/components/chat/editor/editor.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/tui/components/chat/editor/editor.go b/internal/tui/components/chat/editor/editor.go index 6c2766b85077c08b45efc049fdb73f7973a767c0..37d7ec1704734ef99962b735008c7bb28997e9f8 100644 --- a/internal/tui/components/chat/editor/editor.go +++ b/internal/tui/components/chat/editor/editor.go @@ -321,6 +321,8 @@ func (m *editorCmp) Update(msg tea.Msg) (util.Model, tea.Cmd) { case key.Matches(msg, m.keyMap.Next): return m, util.CmdHandler(ScrollHistoryDown{}) } + // if any key other than history related controls we play it safe and close + // the history and reset the text input field to be the current value cmds = append(cmds, util.CmdHandler(CloseHistoryMsg{ valueToSet: m.textarea.Value(), }))