mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-22 04:45:14 +00:00
parent
3dee8778d0
commit
d9b5c9b2be
@ -6,6 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/junegunn/fzf/src/util"
|
"github.com/junegunn/fzf/src/util"
|
||||||
)
|
)
|
||||||
@ -27,7 +28,7 @@ func needWinpty(opts *Options) bool {
|
|||||||
|
|
||||||
We're not going to worry too much about restoring the original value.
|
We're not going to worry too much about restoring the original value.
|
||||||
*/
|
*/
|
||||||
if os.Getenv("MSYS") == "enable_pcon" {
|
if strings.Contains(os.Getenv("MSYS"), "enable_pcon") {
|
||||||
opts.Height = heightSpec{}
|
opts.Height = heightSpec{}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -37,10 +38,10 @@ func needWinpty(opts *Options) bool {
|
|||||||
// os.Setenv("MSYS", "enable_pcon")
|
// os.Setenv("MSYS", "enable_pcon")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if _, err := exec.LookPath("winpty"); err != nil {
|
if opts.NoWinpty {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if opts.NoWinpty {
|
if _, err := exec.LookPath("winpty"); err != nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user