From 888fd35689b7a1a7ca187087c372d621bc0ef709 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 4 May 2018 15:38:27 +0900 Subject: [PATCH] [fzf-tmux] Avoid unnecessary recovery of window options fzf-tmux temporarily turns off remain-on-exit and synchronize-panes options. We don't have to try to restore the values of the options if they were already turned off when fzf-tmux was started. --- bin/fzf-tmux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/fzf-tmux b/bin/fzf-tmux index 1dc2a04a..3233bd54 100755 --- a/bin/fzf-tmux +++ b/bin/fzf-tmux @@ -179,7 +179,7 @@ pppid=$$ echo -n "trap 'kill -SIGUSR1 -$pppid' EXIT SIGINT SIGTERM;" > $argsf close="; trap - EXIT SIGINT SIGTERM $close" -tmux_win_opts=( $(tmux show-window-options remain-on-exit \; show-window-options synchronize-panes | sed 's/^/set-window-option /; s/$/ \\;/') ) +tmux_win_opts=( $(tmux show-window-options remain-on-exit \; show-window-options synchronize-panes | sed '/ off/d; s/^/set-window-option /; s/$/ \\;/') ) if [[ -n "$term" ]] || [[ -t 0 ]]; then cat <<< "\"$fzf\" $opts > $fifo2; echo \$? > $fifo3 $close" >> $argsf