From 0e3e6ac44201b2f051ff1987a63ee6b649070d46 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 21 May 2019 16:35:45 +0900 Subject: [PATCH] Disallow preview scroll when the content just fits the window --- src/terminal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal.go b/src/terminal.go index 06623b28..58cfbcad 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -1055,7 +1055,7 @@ func (t *Terminal) printPreview() { } return fillRet == tui.FillContinue }) - t.previewer.more = t.previewer.more || t.pwindow.Y() == height-1 && t.pwindow.X() > 0 + t.previewer.more = t.previewer.more || t.pwindow.Y() == height-1 && t.pwindow.X() == t.pwindow.Width() if fillRet == tui.FillNextLine { continue } else if fillRet == tui.FillSuspend {