From 02f3cd570d47fb2c97ae2b95b92d6e1a5ff63433 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Thu, 12 Dec 2024 13:58:10 -0500 Subject: [PATCH] fix(cellbuf): always use linefeed to move down when in inline mode --- cellbuf/window.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cellbuf/window.go b/cellbuf/window.go index 19f25fca..0c002a86 100644 --- a/cellbuf/window.go +++ b/cellbuf/window.go @@ -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 }