- fix the status bar width reset even when widows width has not changed
This commit is contained in:
VagrantUser 2013-01-05 17:59:49 +00:00
commit c5b1145b40

View file

@ -37,8 +37,7 @@ done
# Fix status printing for small terminal sizes
width=$(tmux list-windows -F "#{session_width}")
w_last=0
[ -r "$BYOBU_RUN_DIR/width" ] && read w_last < $BYOBU_RUN_DIR/width 2>/dev/null 1>&2 || w_last=0
if [ -r "$BYOBU_RUN_DIR/width" ]; then read w_last < $BYOBU_RUN_DIR/width 2>/dev/null 1>&2; else w_last=0; fi
for w in $width; do
if [ "$w" != "$w_last" ]; then
tmux set -g status-left-length $(($w*1/4)) >/dev/null 2>&1