fix(tui): cursor position
This commit is contained in:
parent
093fbca711
commit
05e6c3d8a0
1 changed files with 5 additions and 3 deletions
|
|
@ -991,9 +991,9 @@ func (a Model) home() (string, int, int) {
|
||||||
)
|
)
|
||||||
|
|
||||||
// Use limit of 4 for vscode, 6 for others
|
// Use limit of 4 for vscode, 6 for others
|
||||||
limit := 6
|
limit := 5
|
||||||
if util.IsVSCode() {
|
if util.IsVSCode() {
|
||||||
limit = 4
|
limit = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
showVscode := util.IsVSCode()
|
showVscode := util.IsVSCode()
|
||||||
|
|
@ -1043,8 +1043,10 @@ func (a Model) home() (string, int, int) {
|
||||||
|
|
||||||
editorX := max(0, (effectiveWidth-editorWidth)/2)
|
editorX := max(0, (effectiveWidth-editorWidth)/2)
|
||||||
editorY := (a.height / 2) + (mainHeight / 2) - 3
|
editorY := (a.height / 2) + (mainHeight / 2) - 3
|
||||||
|
editorYDelta := 3
|
||||||
|
|
||||||
if editorLines > 1 {
|
if editorLines > 1 {
|
||||||
|
editorYDelta = 2
|
||||||
content := a.editor.Content()
|
content := a.editor.Content()
|
||||||
editorHeight := lipgloss.Height(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) {
|
func (a Model) chat() (string, int, int) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue