From 112fea822b66cbac3d295a3a2f86d8ac9e534060 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Wed, 4 Feb 2026 12:26:47 +0300 Subject: [PATCH] fix(ui): cursor mispositioned when pasting large blocks of text in textarea (#2113) --- internal/ui/model/ui.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/ui/model/ui.go b/internal/ui/model/ui.go index 806ce0bcdf4bf0217f759aa97d361b1e60a824b7..28f1a7230308618628c1261c5a3b67fba7432d17 100644 --- a/internal/ui/model/ui.go +++ b/internal/ui/model/ui.go @@ -684,8 +684,13 @@ func (m *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) { cmds = append(cmds, cmd) } case openEditorMsg: + var cmd tea.Cmd m.textarea.SetValue(msg.Text) m.textarea.MoveToEnd() + m.textarea, cmd = m.textarea.Update(msg) + if cmd != nil { + cmds = append(cmds, cmd) + } case uiutil.InfoMsg: m.status.SetInfoMsg(msg) ttl := msg.TTL