Fix minimum preview window height

This commit is contained in:
Junegunn Choi 2021-04-06 20:05:54 +09:00
parent c440418ce6
commit 3a2015ee26
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -865,9 +865,13 @@ func (t *Terminal) resizeWindows() {
}
verticalPad := 2
minPreviewHeight := 3
if t.previewOpts.border == tui.BorderNone {
switch t.previewOpts.border {
case tui.BorderNone, tui.BorderVertical, tui.BorderLeft, tui.BorderRight:
verticalPad = 0
minPreviewHeight = 1
case tui.BorderTop, tui.BorderBottom:
verticalPad = 1
minPreviewHeight = 2
}
switch t.previewOpts.position {
case posUp: