diff options
| author | Adam <[email protected]> | 2025-09-26 06:13:23 -0500 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-09-26 06:13:23 -0500 |
| commit | 05e6c3d8a0b6ee86831458a468fc563a547a374f (patch) | |
| tree | 04c5cd3d4f36f6867a06407b66f09b00e4620b45 | |
| parent | 093fbca711a23667094ffbad582bfbb9539e1f4e (diff) | |
| download | opencode-05e6c3d8a0b6ee86831458a468fc563a547a374f.tar.gz opencode-05e6c3d8a0b6ee86831458a468fc563a547a374f.zip | |
fix(tui): cursor position
| -rw-r--r-- | packages/tui/internal/tui/tui.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/tui/internal/tui/tui.go b/packages/tui/internal/tui/tui.go index ab7abf6fa..3310d517c 100644 --- a/packages/tui/internal/tui/tui.go +++ b/packages/tui/internal/tui/tui.go @@ -991,9 +991,9 @@ func (a Model) home() (string, int, int) { ) // Use limit of 4 for vscode, 6 for others - limit := 6 + limit := 5 if util.IsVSCode() { - limit = 4 + limit = 3 } showVscode := util.IsVSCode() @@ -1043,8 +1043,10 @@ func (a Model) home() (string, int, int) { editorX := max(0, (effectiveWidth-editorWidth)/2) editorY := (a.height / 2) + (mainHeight / 2) - 3 + editorYDelta := 3 if editorLines > 1 { + editorYDelta = 2 content := a.editor.Content() editorHeight := lipgloss.Height(content) @@ -1073,7 +1075,7 @@ func (a Model) home() (string, int, int) { ) } - return mainLayout, editorX + 5, editorY + 3 + return mainLayout, editorX + 5, editorY + editorYDelta } func (a Model) chat() (string, int, int) { |
