From e005d0af9d64444314c120ac5b39b4167c9cd0c6 Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Thu, 10 Jul 2025 16:27:37 +0200 Subject: [PATCH] chore: fix newline with \ --- internal/tui/components/chat/editor/editor.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/tui/components/chat/editor/editor.go b/internal/tui/components/chat/editor/editor.go index f84bb0633df734d467750f3e5258eb71b1f4a387..7988861caded2e6c9a1f9a50125f62638d10a230 100644 --- a/internal/tui/components/chat/editor/editor.go +++ b/internal/tui/components/chat/editor/editor.go @@ -261,8 +261,7 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { value := m.textarea.Value() if len(value) > 0 && value[len(value)-1] == '\\' { // If the last character is a backslash, remove it and add a newline - m.textarea.SetValue(value[:len(value)-1] + "\n") - return m, nil + m.textarea.SetValue(value[:len(value)-1]) } else { // Otherwise, send the message return m, m.send()