Disable preview follow after dragging the scrollbar

TBD: Should we re-enable follow once the offset reaches the bottom?
pull/3117/head
Junegunn Choi 1 year ago
parent 80b8846318
commit 4d22b5aaef
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -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

Loading…
Cancel
Save