summaryrefslogtreecommitdiff
path: root/src/core.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-05-23 18:41:13 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-05-23 18:42:54 +0900
commitd4216b0dcc13567479d81cc5ad2adedb1443ea8b (patch)
tree6ec7aa3dde44344312e483fce316dcce79e1f087 /src/core.go
parentbfe2bf4dced665f8752dab5f2ce17b67f6ff8b53 (diff)
downloadfzf-d4216b0dcc13567479d81cc5ad2adedb1443ea8b.tar.gz
Use MSYS=enable_pcon instead of winpty on mintty 3.4.5 or later
Diffstat (limited to 'src/core.go')
-rw-r--r--src/core.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core.go b/src/core.go
index f0728f80..ec25d1d0 100644
--- a/src/core.go
+++ b/src/core.go
@@ -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 {