diff options
| author | adamdotdevin <[email protected]> | 2025-08-12 07:52:09 -0500 |
|---|---|---|
| committer | adamdotdevin <[email protected]> | 2025-08-12 07:52:19 -0500 |
| commit | b2f2c9ac37e05455c282bf4106a5288d3a1478b3 (patch) | |
| tree | b6fc6977a630d01bfa3d88d763a6168f6f16b1d7 /packages/tui/internal/components | |
| parent | 631722213b177a0cf4e0ebdbf1adf698730dac6a (diff) | |
| download | opencode-b2f2c9ac37e05455c282bf4106a5288d3a1478b3.tar.gz opencode-b2f2c9ac37e05455c282bf4106a5288d3a1478b3.zip | |
fix: use real cursor instead of virtual cursor
Diffstat (limited to 'packages/tui/internal/components')
| -rw-r--r-- | packages/tui/internal/components/chat/editor.go | 6 |
1 files changed, 6 insertions, 0 deletions
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{ |
