Skip to content
Myr

Ignore --height option if it's not supported on the platform

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

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'

authored by Junegunn Choi · committed by Junegunn Choi · parent 564daf9 · Browse files · 2 files+6 added−6 removed
This commit

State

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

Diff stats

2 files+6 added−6 removed

  • other:+6 added−6 removed

2 files+6 added−6 removed

modified:src/options.go+5 added-4 removed
2683 unmodified lines
2684 return err2685 }2686 }26872688 if !tui.IsLightRendererSupported() && opts.Height.size > 0 {2689 return errors.New("--height option is currently not supported on this platform")2690 }26912688 if opts.Scrollbar != nil {2689 runes := []rune(*opts.Scrollbar)2690 if len(runes) > 2 {2691 return errors.New("--scrollbar should be given one or two characters")
144 unmodified lines
2836 theme.Cursor = boldify(theme.Cursor)2837 theme.Spinner = boldify(theme.Spinner)2838 }28392840 // If --height option is not supported on the platform, just ignore it2841 if !tui.IsLightRendererSupported() && opts.Height.size > 0 {2842 opts.Height = heightSpec{}2843 }28442845 if err := opts.initProfiling(); err != nil {2846 return errors.New("failed to start pprof profiles: " + err.Error())2847 }2848
50 unmodified lines
modified:src/winpty_windows.go+1 added-2 removed
22 unmodified lines
23 /*24 See: https://github.com/junegunn/fzf/issues/38092526 "MSYS=enable_pcon" allows fzf to run properly on mintty 3.4.5 or later,27 however `--height` option still doesn't work, so let's just disable it.27 however `--height` option still doesn't work, and it's going to be ignored.2829 We're not going to worry too much about restoring the original value.30 */31 if strings.Contains(os.Getenv("MSYS"), "enable_pcon") {32 opts.Height = heightSpec{}32 return false33 }3435 // Setting the environment variable here unfortunately doesn't help,
43 unmodified lines