From b2f2c9ac37e05455c282bf4106a5288d3a1478b3 Mon Sep 17 00:00:00 2001 From: adamdotdevin <2363879+adamdottv@users.noreply.github.com> Date: Tue, 12 Aug 2025 07:52:09 -0500 Subject: fix: use real cursor instead of virtual cursor --- packages/tui/internal/components/chat/editor.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'packages/tui/internal/components') diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.go index 509de6244..980d5262c 100644 --- a/packages/tui/internal/components/chat/editor.go +++ b/packages/tui/internal/components/chat/editor.go @@ -31,6 +31,7 @@ type EditorComponent interface { tea.Model tea.ViewModel Content() string + Cursor() *tea.Cursor Lines() int Value() string Length() int @@ -407,6 +408,10 @@ func (m *editorComponent) Content() string { return content } +func (m *editorComponent) Cursor() *tea.Cursor { + return m.textarea.Cursor() +} + func (m *editorComponent) View() string { width := m.width if m.app.Session.ID == "" { @@ -694,6 +699,7 @@ func NewEditorComponent(app *app.App) EditorComponent { ta.Prompt = " " ta.ShowLineNumbers = false ta.CharLimit = -1 + ta.VirtualCursor = false ta = updateTextareaStyles(ta) m := &editorComponent{ -- cgit v1.2.3