mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-14 06:13:47 -05:00
Set the default value of --min-height depending on other options
This commit is contained in:
@@ -799,7 +799,7 @@ func NewTerminal(opts *Options, eventBox *util.EventBox, executor *util.Executor
|
||||
if previewBox != nil && opts.Preview.aboveOrBelow() {
|
||||
effectiveMinHeight += 1 + borderLines(opts.Preview.Border())
|
||||
}
|
||||
if noSeparatorLine(opts.InfoStyle, opts.Separator == nil || uniseg.StringWidth(*opts.Separator) > 0) {
|
||||
if opts.noSeparatorLine() {
|
||||
effectiveMinHeight--
|
||||
}
|
||||
effectiveMinHeight += borderLines(opts.BorderShape)
|
||||
@@ -1264,16 +1264,6 @@ func (t *Terminal) parsePrompt(prompt string) (func(), int) {
|
||||
return output, promptLen
|
||||
}
|
||||
|
||||
func noSeparatorLine(style infoStyle, separator bool) bool {
|
||||
switch style {
|
||||
case infoInline:
|
||||
return true
|
||||
case infoHidden, infoInlineRight:
|
||||
return !separator
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (t *Terminal) noSeparatorLine() bool {
|
||||
return noSeparatorLine(t.infoStyle, t.separatorLen > 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user