summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-06-26 12:57:11 -0500
committerJay V <[email protected]>2025-06-26 17:22:21 -0400
commit90face1c0915098f6dfb7ac3be5f80fd3b7500a7 (patch)
tree828c63fca3d1a86ecfc846331b00dbd8e7f35275
parent936e2ce48bf741fe6ce180e7706566b2d6479874 (diff)
downloadopencode-90face1c0915098f6dfb7ac3be5f80fd3b7500a7.tar.gz
opencode-90face1c0915098f6dfb7ac3be5f80fd3b7500a7.zip
fix(tui): editor width issues
-rw-r--r--packages/tui/internal/components/chat/editor.go5
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())
}