From 4d22b5aaef2094441e735c6a256e325e72e8c7ce Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 9 Jan 2023 11:07:31 +0900 Subject: [PATCH] Disable preview follow after dragging the scrollbar TBD: Should we re-enable follow once the offset reaches the bottom? --- src/terminal.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/terminal.go b/src/terminal.go index 9314599..c8e8705 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -3177,6 +3177,7 @@ func (t *Terminal) Loop() { y = util.Constrain(y, 0, effectiveHeight-barLength) // offset = (total - maxItems) * barStart / (maxItems - barLength) t.previewer.offset = headerLines + int(math.Ceil(float64(y)*float64(numLines-effectiveHeight)/float64(effectiveHeight-barLength))) + t.previewer.following = false req(reqPreviewRefresh) } break