diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2021-03-12 21:23:16 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2021-03-12 21:23:16 +0900 |
commit | b24a2e2fdcf15b3d0d353795f4bfa3d0b0fc06e6 (patch) | |
tree | 6dc97e8462c7fb08eb9f345d48c15b8a654a3f6a | |
parent | 4c4c6e626e48575602d7ee86fb9a8ee0816a0a11 (diff) |
Fix regression in preview window rendering
-rw-r--r-- | src/tui/light.go | 7 |
1 files changed, 6 insertions, 1 deletions
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 |