mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +00:00
fixed a small bug in 2.1.16 that broke irc line counter
This commit is contained in:
parent
26e1d560c3
commit
713535277b
5
inxi
5
inxi
|
@ -8915,8 +8915,8 @@ calculate_line_length()
|
||||||
{
|
{
|
||||||
local string=$1
|
local string=$1
|
||||||
# ansi: [1;34m irc: \x0312
|
# ansi: [1;34m irc: \x0312
|
||||||
# note: using special trick for bsd sed, tr
|
# 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 )
|
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}
|
count=${#string}
|
||||||
echo $count
|
echo $count
|
||||||
}
|
}
|
||||||
|
@ -9735,7 +9735,6 @@ print_graphics_data()
|
||||||
|
|
||||||
part_1_data="$display_server_string$driver_string"
|
part_1_data="$display_server_string$driver_string"
|
||||||
part_2_data="${C1}$res_tty$SEP3${C2} $screen_resolution $root_x_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 ) && \
|
if [[ -n $( grep -vE '^[[:space:]]*$' <<< $part_1_data$part_2_data ) && \
|
||||||
$( calculate_line_length "$part_1_data $part_2_data" ) -gt $COLS_INNER ]];then
|
$( calculate_line_length "$part_1_data $part_2_data" ) -gt $COLS_INNER ]];then
|
||||||
graphics_data=$( create_print_line "$line_starter" "$part_1_data" )
|
graphics_data=$( create_print_line "$line_starter" "$part_1_data" )
|
||||||
|
|
Loading…
Reference in a new issue