Skip to content

Commit 90face1

Browse files
adamdotdevinjayair
authored andcommitted
fix(tui): editor width issues
1 parent 936e2ce commit 90face1

File tree

1 file changed

+2
-3
lines changed
  • packages/tui/internal/components/chat

1 file changed

+2
-3
lines changed

packages/tui/internal/components/chat/editor.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ func (m *editorComponent) GetSize() (width, height int) {
182182
func (m *editorComponent) SetSize(width, height int) tea.Cmd {
183183
m.width = width
184184
m.height = height
185-
m.textarea.SetWidth(width - 5) // account for the prompt and padding right
186-
// m.textarea.SetHeight(height - 4)
187185
return nil
188186
}
189187

@@ -329,10 +327,11 @@ func createTextArea(existing *textarea.Model) textarea.Model {
329327
ta.Prompt = " "
330328
ta.ShowLineNumbers = false
331329
ta.CharLimit = -1
330+
ta.SetWidth(layout.Current.Container.Width - 6)
332331

333332
if existing != nil {
334333
ta.SetValue(existing.Value())
335-
ta.SetWidth(existing.Width())
334+
// ta.SetWidth(existing.Width())
336335
ta.SetHeight(existing.Height())
337336
}
338337

0 commit comments

Comments
 (0)