Skip to content

Commit

Permalink
Fix cursor placement of tcell renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Jan 3, 2025
1 parent d57e1f8 commit fb3bf6c
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -3181,17 +3181,28 @@ func (t *Terminal) printAll() {
func (t *Terminal) flush() {
t.placeCursor()
if !t.suppress {
windows := make([]tui.Window, 0, 4)
if t.borderShape.Visible() {
windows := make([]tui.Window, 0, 7)
if t.border != nil {
windows = append(windows, t.border)
}
if t.hasPreviewWindow() {
if t.pborder != nil {
windows = append(windows, t.pborder)
}
if t.pborder != nil {
windows = append(windows, t.pborder)
}
if t.pwindow != nil {
windows = append(windows, t.pwindow)
}
windows = append(windows, t.window)
if t.wborder != nil {
windows = append(windows, t.wborder)
}
if t.window != nil {
windows = append(windows, t.window)
}
if t.inputBorder != nil {
windows = append(windows, t.inputBorder)
}
if t.inputWindow != nil {
windows = append(windows, t.inputWindow)
}
t.tui.RefreshWindows(windows)
}
}
Expand Down

0 comments on commit fb3bf6c

Please sign in to comment.