summaryrefslogtreecommitdiffstats
path: root/bin/fzf-tmux
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2018-05-04 15:38:27 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2018-05-04 15:38:27 +0900
commit888fd35689b7a1a7ca187087c372d621bc0ef709 (patch)
treeb9b827e8288a8f3db9cfb48d91d36b263d8a9b6b /bin/fzf-tmux
parent1fb0fbca586d88666a906b910f2644e87d30d265 (diff)
[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.
Diffstat (limited to 'bin/fzf-tmux')
-rwxr-xr-xbin/fzf-tmux2
1 files changed, 1 insertions, 1 deletions
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