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

View File

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