mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-10 09:02:01 -07:00
Disable preview follow after dragging the scrollbar
TBD: Should we re-enable follow once the offset reaches the bottom?
This commit is contained in:
@@ -3177,6 +3177,7 @@ func (t *Terminal) Loop() {
|
|||||||
y = util.Constrain(y, 0, effectiveHeight-barLength)
|
y = util.Constrain(y, 0, effectiveHeight-barLength)
|
||||||
// offset = (total - maxItems) * barStart / (maxItems - barLength)
|
// offset = (total - maxItems) * barStart / (maxItems - barLength)
|
||||||
t.previewer.offset = headerLines + int(math.Ceil(float64(y)*float64(numLines-effectiveHeight)/float64(effectiveHeight-barLength)))
|
t.previewer.offset = headerLines + int(math.Ceil(float64(y)*float64(numLines-effectiveHeight)/float64(effectiveHeight-barLength)))
|
||||||
|
t.previewer.following = false
|
||||||
req(reqPreviewRefresh)
|
req(reqPreviewRefresh)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
Reference in New Issue
Block a user