fixed a small bug in 2.1.16 that broke irc line counter

This commit is contained in:
inxi-svn 2014-04-03 05:11:36 +00:00
parent 26e1d560c3
commit 713535277b

5
inxi
View file

@ -8915,8 +8915,8 @@ calculate_line_length()
{
local string=$1
# ansi:  irc: \x0312
# note: using special trick for bsd sed, tr
string=$( sed -e 's/'$ESC'\[[0-9]\{1,2\}\(;[0-9]\{1,2\}\)\{0,2\}m//g' -e 's/\\\x0[0-9]\{1,3\}//g' <<< $string )
# note: using special trick for bsd sed, tr - NOTE irc sed must use " double quote
string=$( sed -e 's/'$ESC'\[[0-9]\{1,2\}\(;[0-9]\{1,2\}\)\{0,2\}m//g' -e "s/\\\x0[0-9]\{1,3\}//g" <<< $string )
count=${#string}
echo $count
}
@ -9735,7 +9735,6 @@ print_graphics_data()
part_1_data="$display_server_string$driver_string"
part_2_data="${C1}$res_tty$SEP3${C2} $screen_resolution $root_x_string"
if [[ -n $( grep -vE '^[[:space:]]*$' <<< $part_1_data$part_2_data ) && \
$( calculate_line_length "$part_1_data $part_2_data" ) -gt $COLS_INNER ]];then
graphics_data=$( create_print_line "$line_starter" "$part_1_data" )