Skip to content
Myr

Fix maximum preview height without horizontal separator

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

The minimum window height decreases when no extra line for the horizontal separator is used (e.g. with `--info=inline --no-separator`). In this case the preview window should be able to occupy this extra line.

authored by Julian Prein · committed by Junegunn Choi · parent e4e4700 · Browse files · 1 file+5 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+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:src/terminal.go+5 added-1 removed
1646 unmodified lines
1647 minPreviewHeight = 21648 }1649 switch previewOpts.position {1650 case posUp, posDown:1651 minWindowHeight := minHeight1652 if t.noSeparatorLine() {1653 minWindowHeight--1654 }1651 pheight := calculateSize(height, previewOpts.size, minHeight, minPreviewHeight, verticalPad)1655 pheight := calculateSize(height, previewOpts.size, minWindowHeight, minPreviewHeight, verticalPad)1656 if hasThreshold && pheight < previewOpts.threshold {1657 t.activePreviewOpts = previewOpts.alternative1658 if forcePreview {1659 previewOpts.alternative.hidden = false
3637 unmodified lines