Fix regression where lines are skipped in the preview window

Fix #2239
pull/2246/head
Junegunn Choi 4 years ago
parent 15d351b0f0
commit 1bcbc5a353
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -1,6 +1,10 @@
CHANGELOG
=========
0.24.2
------
- Bug fixes and improvements
0.24.1
------
- Fixed broken `--color=[bw|no]` option

@ -1254,6 +1254,7 @@ func (t *Terminal) renderPreviewText(unchanged bool) {
}
var ansi *ansiState
for _, line := range t.previewer.lines {
line = strings.TrimSuffix(line, "\n")
if lineNo >= height || t.pwindow.Y() == height-1 && t.pwindow.X() > 0 {
t.previewed.filled = true
break
@ -1284,6 +1285,7 @@ func (t *Terminal) renderPreviewText(unchanged bool) {
if unchanged && lineNo == 0 {
break
}
t.pwindow.Fill("\n")
}
lineNo++
}

Loading…
Cancel
Save