Use MSYS=enable_pcon instead of winpty on mintty 3.4.5 or later

This commit is contained in:
Junegunn Choi
2024-05-23 18:41:13 +09:00
parent bfe2bf4dce
commit d4216b0dcc
5 changed files with 118 additions and 5 deletions

View File

@@ -3,7 +3,6 @@ package fzf
import (
"os"
"os/exec"
"sync"
"time"
@@ -25,10 +24,8 @@ func Run(opts *Options) (int, error) {
return runTmux(os.Args, opts)
}
if os.Getenv("TERM_PROGRAM") == "mintty" && !opts.NoWinpty {
if _, err := exec.LookPath("winpty"); err == nil {
return runWinpty(os.Args, opts)
}
if needWinpty(opts) {
return runWinpty(os.Args, opts)
}
if err := postProcessOptions(opts); err != nil {