m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 15:23:48 -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:
Junegunn Choi
2024-06-01 14:13:24 +09:00
parent 564daf9a7d
commit 555b0d235b
2 changed files with 6 additions and 6 deletions

View File

@@ -24,12 +24,11 @@ func needWinpty(opts *Options) bool {
See: https://github.com/junegunn/fzf/issues/3809
"MSYS=enable_pcon" allows fzf to run properly on mintty 3.4.5 or later,
however `--height` option still doesn't work, so let's just disable it.
however `--height` option still doesn't work, and it's going to be ignored.
We're not going to worry too much about restoring the original value.
*/
if strings.Contains(os.Getenv("MSYS"), "enable_pcon") {
opts.Height = heightSpec{}
return false
}