diff options
| author | adamdottv <[email protected]> | 2025-06-26 12:57:11 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-06-26 12:57:11 -0500 |
| commit | 35fba793d057c23a856ebac6329ed4dcb6abe937 (patch) | |
| tree | 5079d8a8f307fffccee14762458dd235190072f8 | |
| parent | 5358d43b74a908de866dd0123caf80b9a7d09fee (diff) | |
| download | opencode-35fba793d057c23a856ebac6329ed4dcb6abe937.tar.gz opencode-35fba793d057c23a856ebac6329ed4dcb6abe937.zip | |
fix(tui): editor width issues
| -rw-r--r-- | packages/tui/internal/components/chat/editor.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.go index 72357941d..0ac3978a8 100644 --- a/packages/tui/internal/components/chat/editor.go +++ b/packages/tui/internal/components/chat/editor.go @@ -182,8 +182,6 @@ func (m *editorComponent) GetSize() (width, height int) { func (m *editorComponent) SetSize(width, height int) tea.Cmd { m.width = width m.height = height - m.textarea.SetWidth(width - 5) // account for the prompt and padding right - // m.textarea.SetHeight(height - 4) return nil } @@ -329,10 +327,11 @@ func createTextArea(existing *textarea.Model) textarea.Model { ta.Prompt = " " ta.ShowLineNumbers = false ta.CharLimit = -1 + ta.SetWidth(layout.Current.Container.Width - 6) if existing != nil { ta.SetValue(existing.Value()) - ta.SetWidth(existing.Width()) + // ta.SetWidth(existing.Width()) ta.SetHeight(existing.Height()) } |
