summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorkarasu <ketcoding@gmail.com>2020-05-23 20:47:43 +0900
committerGitHub <noreply@github.com>2020-05-23 20:47:43 +0900
commit01cf01e084e25817b1eaf6abb694659ef212571d (patch)
treecf286d1012e602dd65055306e6d952fbafb8b1f8 /bin
parent97a725fbd0e54cbc07e4d72661ea2bd2bb7c01c1 (diff)
[fzf-tmux] Fix zoomed pane handling in popup mode (#2054)
When called with popup options, do not move to temp window.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/fzf-tmux10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/fzf-tmux b/bin/fzf-tmux
index 4b3e497f..a65acc2d 100755
--- a/bin/fzf-tmux
+++ b/bin/fzf-tmux
@@ -138,9 +138,9 @@ fi
# --height option is not allowed
args=("--no-height" "${args[@]}")
-# Handle zoomed tmux pane by moving it to a temp window
-if tmux list-panes -F '#F' | grep -q Z; then
- zoomed=1
+# Handle zoomed tmux pane without popup options by moving it to a temp window
+if [[ ! "$opt" =~ "-K -E" ]] && tmux list-panes -F '#F' | grep -q Z; then
+ zoomed_without_popup=1
original_window=$(tmux display-message -p "#{window_id}")
tmp_window=$(tmux new-window -d -P -F "#{window_id}" "bash -c 'while :; do for c in \\| / - '\\;' do sleep 0.2; printf \"\\r\$c fzf-tmux is running\\r\"; done; done'")
tmux swap-pane -t $tmp_window \; select-window -t $tmp_window
@@ -162,8 +162,8 @@ cleanup() {
eval "tmux ${tmux_win_opts[@]}"
fi
- # Remove temp window if we were zoomed
- if [[ -n "$zoomed" ]]; then
+ # Remove temp window if we were zoomed without popup options
+ if [[ -n "$zoomed_without_popup" ]]; then
tmux display-message -p "#{window_id}" > /dev/null
tmux swap-pane -t $original_window \; \
select-window -t $original_window \; \