From 19e9b620ba222b8f56d0d68194809066772b85fe Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Sat, 9 Nov 2024 19:26:17 +0100 Subject: [PATCH] Fix maximum preview height without horizontal separator 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. --- src/terminal.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/terminal.go b/src/terminal.go index 73054b0..467682a 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -1648,7 +1648,11 @@ func (t *Terminal) resizeWindows(forcePreview bool) { } switch previewOpts.position { case posUp, posDown: - pheight := calculateSize(height, previewOpts.size, minHeight, minPreviewHeight, verticalPad) + minWindowHeight := minHeight + if t.noSeparatorLine() { + minWindowHeight-- + } + pheight := calculateSize(height, previewOpts.size, minWindowHeight, minPreviewHeight, verticalPad) if hasThreshold && pheight < previewOpts.threshold { t.activePreviewOpts = previewOpts.alternative if forcePreview {