Skip to content

Commit 5cce17e

Browse files
committed
Fix preview window incorrectly rendering empty line at the bottom
1 parent ee5302f commit 5cce17e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/terminal.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -2722,10 +2722,14 @@ Loop:
27222722
break
27232723
}
27242724
if lbg >= 0 {
2725-
t.pwindow.CFill(-1, lbg, tui.AttrRegular,
2725+
fillRet = t.pwindow.CFill(-1, lbg, tui.AttrRegular,
27262726
strings.Repeat(" ", t.pwindow.Width()-t.pwindow.X())+"\n")
27272727
} else {
2728-
t.pwindow.Fill("\n")
2728+
fillRet = t.pwindow.Fill("\n")
2729+
}
2730+
if fillRet == tui.FillSuspend {
2731+
t.previewed.filled = true
2732+
break
27292733
}
27302734
}
27312735
lineNo++

0 commit comments

Comments
 (0)