on main help sign in
chore: fix newline with \
e005d0aKujtim Hoxha
internal/tui/components/chat/editor/editor.go+1−2
@@ -261,8 +261,7 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
261 value := m.textarea.Value()
261 value := m.textarea.Value()
262 if len(value) > 0 && value[len(value)-1] == '\\' {
262 if len(value) > 0 && value[len(value)-1] == '\\' {
263 // If the last character is a backslash, remove it and add a newline
263 // If the last character is a backslash, remove it and add a newline
264− m.textarea.SetValue(value[:len(value)-1] + "\n")
264+ m.textarea.SetValue(value[:len(value)-1])
265− return m, nil
266 } else {
265 } else {
267 // Otherwise, send the message
266 // Otherwise, send the message
268 return m, m.send()
267 return m, m.send()