Skip to content
Myr

Allow preview window height shorter than 3

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

Fix #2231

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

  • other:+5 added−3 removed

1 file+5 added−3 removed

modified:src/terminal.go+5 added-3 removed
651 unmodified lines
652 return l653}654655const (656 minWidth = 16656 minWidth = 4657 minHeight = 4658659 maxDisplayWidthCalc = 1024660)
139 unmodified lines
800 }801 t.pwindow = t.tui.NewWindow(y, x, pwidth, pheight, true, noBorder)802 }803 verticalPad := 2804 minPreviewHeight := 3805 if t.preview.border == tui.BorderNone {806 verticalPad = 0807 minPreviewHeight = 1808 }809 switch t.preview.position {810 case posUp:809 pheight := calculateSize(height, t.preview.size, minHeight, 3, verticalPad)811 pheight := calculateSize(height, t.preview.size, minHeight, minPreviewHeight, verticalPad)812 t.window = t.tui.NewWindow(813 marginInt[0]+pheight, marginInt[3], width, height-pheight, false, noBorder)814 createPreviewWindow(marginInt[0], marginInt[3], width, pheight)815 case posDown:814 pheight := calculateSize(height, t.preview.size, minHeight, 3, verticalPad)816 pheight := calculateSize(height, t.preview.size, minHeight, minPreviewHeight, verticalPad)817 t.window = t.tui.NewWindow(818 marginInt[0], marginInt[3], width, height-pheight, false, noBorder)819 createPreviewWindow(marginInt[0]+height-pheight, marginInt[3], width, pheight)820 case posLeft:
1770 unmodified lines