From: Zac Medico Date: Fri, 31 Oct 2008 17:25:44 +0000 (-0000) Subject: Bug #236609 - Fix columns calculation for TERM="dumb". Thanks to Ulrich Müller X-Git-Tag: v2.2_rc13~26 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4d3b1f1c221bc93fc9b3168f512b8afa8889372c;p=portage.git Bug #236609 - Fix columns calculation for TERM="dumb". Thanks to Ulrich Müller for the patch. svn path=/main/trunk/; revision=11764 --- diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 09854b282..2bb98aee1 100755 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -371,7 +371,7 @@ set_colors() { (( COLS > 0 )) || (( COLS = 80 )) COLS=$((${COLS} - 8)) # width of [ ok ] == 7 # Adjust COLS so that eend works properly on a standard BSD console. - [ "${TERM}" = "cons25" ] && COLS=$((${COLS} - 1)) + [[ $TERM = cons25 || $TERM = dumb ]] && ((COLS--)) # Now, ${ENDCOL} will move us to the end of the # column; irregardless of character width