diff options
| author | Julian Prein <julian@druckdev.xyz> | 2024-11-09 19:26:17 +0100 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2024-12-12 13:53:08 +0900 |
| commit | 19e9b620ba222b8f56d0d68194809066772b85fe (patch) | |
| tree | 81ae7b4767ccce8d71a00b1284031d1fcee2cd4c /src | |
| parent | e4e4700affff4436a7ae827c7a193c9287e8795a (diff) | |
| download | fzf-19e9b620ba222b8f56d0d68194809066772b85fe.tar.gz | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/terminal.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/terminal.go b/src/terminal.go index 73054b02..467682a9 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 { |
