summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2023-01-09 11:07:31 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2023-01-09 11:07:31 +0900
commit4d22b5aaef2094441e735c6a256e325e72e8c7ce (patch)
tree3e9946e451855de1966dcc4e5f6bf001779dbe73 /src
parent80b88463188ff78719f23cb2e1dca5f27227879e (diff)
downloadfzf-4d22b5aaef2094441e735c6a256e325e72e8c7ce.tar.gz
Disable preview follow after dragging the scrollbar
TBD: Should we re-enable follow once the offset reaches the bottom?
Diffstat (limited to 'src')
-rw-r--r--src/terminal.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/terminal.go b/src/terminal.go
index 93145999..c8e87056 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