docs: add useful explanatory comment for fallback behaviour

tauraamui created

Change summary

internal/tui/components/chat/editor/editor.go | 2 ++
1 file changed, 2 insertions(+)

Detailed changes

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(),
 			}))