From c5b1145b4075f1e206e5528f0002d60fa3899a5a Mon Sep 17 00:00:00 2001 From: VagrantUser Date: Sat, 5 Jan 2013 17:59:49 +0000 Subject: [PATCH] LP: #1073145 - fix the status bar width reset even when widows width has not changed --- usr/bin/byobu-status | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr/bin/byobu-status b/usr/bin/byobu-status index b3bec705..71981ae9 100755 --- a/usr/bin/byobu-status +++ b/usr/bin/byobu-status @@ -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