Skip to content
Myr

Disable preview follow after dragging the scrollbar

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 80b8846 · Browse files · 1 file+1 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • TBD: Should we re-enable follow once the offset reaches the bottom?

Diff stats

1 file+1 added−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:src/terminal.go+1 added
3175 unmodified lines
3176 y := my - t.pwindow.Top() - headerLines - barLength/23177 y = util.Constrain(y, 0, effectiveHeight-barLength)3178 // offset = (total - maxItems) * barStart / (maxItems - barLength)3179 t.previewer.offset = headerLines + int(math.Ceil(float64(y)*float64(numLines-effectiveHeight)/float64(effectiveHeight-barLength)))3180 t.previewer.following = false3181 req(reqPreviewRefresh)3182 }3183 break3184 }
284 unmodified lines