on main help sign in
fix(ui): cursor mispositioned when pasting large blocks of text in textarea (#2113)
commit112fea822b66cbac3d295a3a2f86d8ac9e534060 authorAyman Bagabas <ayman.bagabas@gmail.com> dateWed 4 Feb 2026, 12:26 (8 months ago) parent6ff14c1
1 file changed+5
internal/ui/model/ui.go+5
internal/ui/model/ui.go+5
@@ -684,8 +684,13 @@ func (m *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
684684 cmds = append(cmds, cmd)
685685 }
686686 case openEditorMsg:
687+ var cmd tea.Cmd
687688 m.textarea.SetValue(msg.Text)
688689 m.textarea.MoveToEnd()
690+ m.textarea, cmd = m.textarea.Update(msg)
691+ if cmd != nil {
692+ cmds = append(cmds, cmd)
693+ }
689694 case uiutil.InfoMsg:
690695 m.status.SetInfoMsg(msg)
691696 ttl := msg.TTL