Skip to content

Commit

Permalink
fix(cellbuf): always use linefeed to move down when in inline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Dec 12, 2024
1 parent ad4b7ae commit 02f3cd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cellbuf/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ func relativeCursorMove(s *Screen, fx, fy, tx, ty int, overwrite bool) (seq stri
if cud := ansi.CursorDown(n); yseq == "" || len(cud) < len(yseq) {
yseq = cud
}
shouldScroll := !s.opts.AltScreen && fy+n >= s.newbuf.Height()
if lf := strings.Repeat("\n", n); yseq == "" || shouldScroll || fy+n < s.newbuf.Height() && len(lf) < len(yseq) {
shouldScroll := !s.opts.AltScreen
if lf := strings.Repeat("\n", n); yseq == "" || shouldScroll || (fy+n < s.newbuf.Height() && len(lf) < len(yseq)) {
// TODO: Ensure we're not unintentionally scrolling the screen down.
yseq = lf
}
Expand Down

0 comments on commit 02f3cd5

Please sign in to comment.