From 9f953fc9440a6df9dcfc177555e0b4dd7444fd0a Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 28 Jul 2015 00:22:04 +0900 Subject: [PATCH] Do not use tmux pane if the current pane is zoomed Close #303 --- bin/fzf-tmux | 2 +- plugin/fzf.vim | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/fzf-tmux b/bin/fzf-tmux index c723288..e0fe77d 100755 --- a/bin/fzf-tmux +++ b/bin/fzf-tmux @@ -82,7 +82,7 @@ while [ $# -gt 0 ]; do shift done -if [ -z "$TMUX_PANE" ]; then +if [ -z "$TMUX_PANE" ] || tmux list-panes -F '#F' | grep -q Z; then fzf "${args[@]}" exit $? fi diff --git a/plugin/fzf.vim b/plugin/fzf.vim index a149e79..1a245d9 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -64,7 +64,8 @@ function! s:tmux_enabled() endif let s:tmux = 0 - if exists('$TMUX') && executable(s:fzf_tmux) + let panes = system('tmux list-panes -F "#F"') + if exists('$TMUX') && executable(s:fzf_tmux) && panes !~# 'Z' let output = system('tmux -V') let s:tmux = !v:shell_error && output >= 'tmux 1.7' endif