m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 15:23:48 -05:00

Disable tmux popup when already running inside one (#4351)

This commit is contained in:
Pierre Guinoiseau
2025-04-18 20:35:48 +12:00
committed by GitHub
parent 8ef9dfd9a2
commit af8fe918d8
2 changed files with 3 additions and 2 deletions

View File

@@ -39,7 +39,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 {
if opts.Tmux != nil && len(os.Getenv("TMUX")) > 0 && len(os.Getenv("TMUX_PANE")) > 0 && opts.Tmux.index >= opts.Height.index {
return runTmux(os.Args, opts)
}