Bug #236609 - Fix columns calculation for TERM="dumb". Thanks to Ulrich Müller
authorZac Medico <zmedico@gentoo.org>
Fri, 31 Oct 2008 17:25:44 +0000 (17:25 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 31 Oct 2008 17:25:44 +0000 (17:25 -0000)
<ulm@g.o> for the patch.

svn path=/main/trunk/; revision=11764

bin/isolated-functions.sh

index 09854b282de42ed152469809ce62c41566aa3fb4..2bb98aee1473f478b83f8fa07addb0cb459d62ed 100755 (executable)
@@ -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