mirror of
1
0
Fork 0

fixed race condition in maximize_pane()

This commit is contained in:
Gregory Pakosz 2013-04-15 23:49:56 +02:00
parent 45d450d58f
commit 316900967b
1 changed files with 10 additions and 3 deletions

View File

@ -240,10 +240,17 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na
# if [ x"${__restore}" = x ] ; then
# [ x"$(tmux list-panes | wc -l | sed 's/^ *//g')" = x1 ] && tmux display "Can't maximize with only one pane" && return
#
# tmux new-window "exec maximized+ 2> /dev/null | tmux setw remain-on-exit on && printf '\033]2;%s\033\\' [+]${__current_pane}"
# __window=$(tmux new-window -P "exec maximized+ 2> /dev/null | tmux setw remain-on-exit on && printf '\033]2;%s\033\\' [+]${__current_pane}")
# __window=${__window%.*}
#
# __guard=100
# while ( [ x"$(tmux list-panes -t ${__window} -F '#S:#I #{pane_dead}')" != x"${__window} "1 ] && [ x"${__guard}" != x0 ] ) ; do sleep 0.01 ; _guard=$((__guard - 1)) ; done
# if [ x"${__guard}" = 0 ] ; then
# exit 1
# fi
#
# __new_pane=$(tmux display -p '#D')
# tmux setw remain-on-exit off
# tmux swap-pane -s "${__current_pane}" -t "${__new_pane}"
# tmux setw remain-on-exit off \; swap-pane -s "${__current_pane}" -t "${__new_pane}"
# else
# ${__restore}
# fi