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
|
||||
# ansi: [1;34m 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" )
|
||||
|
|
Loading…
Reference in a new issue