From b24a2e2fdcf15b3d0d353795f4bfa3d0b0fc06e6 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 12 Mar 2021 21:23:16 +0900 Subject: [PATCH] Fix regression in preview window rendering --- src/tui/light.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tui/light.go b/src/tui/light.go index 95e7bfd0..a1234166 100644 --- a/src/tui/light.go +++ b/src/tui/light.go @@ -920,7 +920,12 @@ func (w *LightWindow) fill(str string, onMove func()) FillReturn { } } } - if w.posx >= w.Width()-1 { + if w.posx+1 >= w.Width() { + if w.posy+1 >= w.height { + return FillSuspend + } + w.Move(w.posy+1, 0) + onMove() return FillNextLine } return FillContinue