Do not open tmux or winpty in --filter mode

This commit is contained in:
Junegunn Choi 2024-06-12 21:02:48 +09:00
parent 144d55a5be
commit a1a72bb8d1
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -38,12 +38,14 @@ func (r revision) compatible(other revision) bool {
// Run starts fzf
func Run(opts *Options) (int, error) {
if opts.Tmux != nil && len(os.Getenv("TMUX")) > 0 && opts.Tmux.index >= opts.Height.index {
return runTmux(os.Args, opts)
}
if opts.Filter == nil {
if opts.Tmux != nil && len(os.Getenv("TMUX")) > 0 && opts.Tmux.index >= opts.Height.index {
return runTmux(os.Args, opts)
}
if needWinpty(opts) {
return runWinpty(os.Args, opts)
if needWinpty(opts) {
return runWinpty(os.Args, opts)
}
}
if err := postProcessOptions(opts); err != nil {