Skip to content
Myr

Fix scrollability of the preview window when preview offset is specified

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

This should not be scrollable fzf --preview 'seq $FZF_PREVIEW_LINES' --preview-window '~5'

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

State

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

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/terminal.go+1 added-1 removed
2079 unmodified lines
2080 height := t.pwindow.Height()2081 unchanged := (t.previewed.filled || numLines == t.previewed.numLines) &&2082 t.previewer.version == t.previewed.version &&2083 t.previewer.offset == t.previewed.offset2084 t.previewer.scrollable = t.previewer.offset > 0 || numLines > height2084 t.previewer.scrollable = t.previewer.offset > t.previewOpts.headerLines || numLines > height2085 t.renderPreviewArea(unchanged)2086 t.renderPreviewSpinner()2087 t.previewed.numLines = numLines2088 t.previewed.version = t.previewer.version
1807 unmodified lines