mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-15 06:43:47 -05:00
Ignore --height option if it's not supported on the platform
This is to make shell integration work out of the box on Git bash.
eval "$(fzf --bash)"
vim <CTRL-T>
# would print '--height option is currently not supported on this platform'
This commit is contained in:
@@ -2685,10 +2685,6 @@ func validateOptions(opts *Options) error {
|
||||
}
|
||||
}
|
||||
|
||||
if !tui.IsLightRendererSupported() && opts.Height.size > 0 {
|
||||
return errors.New("--height option is currently not supported on this platform")
|
||||
}
|
||||
|
||||
if opts.Scrollbar != nil {
|
||||
runes := []rune(*opts.Scrollbar)
|
||||
if len(runes) > 2 {
|
||||
@@ -2841,6 +2837,11 @@ func postProcessOptions(opts *Options) error {
|
||||
theme.Spinner = boldify(theme.Spinner)
|
||||
}
|
||||
|
||||
// If --height option is not supported on the platform, just ignore it
|
||||
if !tui.IsLightRendererSupported() && opts.Height.size > 0 {
|
||||
opts.Height = heightSpec{}
|
||||
}
|
||||
|
||||
if err := opts.initProfiling(); err != nil {
|
||||
return errors.New("failed to start pprof profiles: " + err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user