From 711cedbed82a62e1e7140c8d743cb9179280029a Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Tue, 17 Dec 2019 02:14:48 +0900 Subject: [PATCH] follow bash syntactic changes on arithmentic command --- src/canvas.sh | 4 ++-- src/color.sh | 2 +- src/decode.sh | 4 ++-- src/edit.sh | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/canvas.sh b/src/canvas.sh index 0674b7e8..69bd4435 100644 --- a/src/canvas.sh +++ b/src/canvas.sh @@ -210,7 +210,7 @@ function ble/util/c2w+emacs { return fi - ((' + (( 0x3100<=code&&code<0xA4D0||0xAC00<=code&&code<0xD7A4?( ret=2 ):(0x2000<=code&&code<0x2700?( @@ -241,7 +241,7 @@ function ble/util/c2w+emacs { ret=0x01<=al&&al<0x61||0xE0<=al&&al<=0xE7?2:1 ):(ret=1)))))))))) )) - ')) + )) [[ $tIndex ]] || return 0 diff --git a/src/color.sh b/src/color.sh index 5f3be06b..1bfba19d 100644 --- a/src/color.sh +++ b/src/color.sh @@ -272,7 +272,7 @@ function ble/color/.color2sgr-impl { local ccode=$1 prefix=$2 # 3 for fg, 4 for bg if ((ccode<0)); then ret=${prefix}9 - elif ((ccode<\(_ble_term_colors<16?_ble_term_colors:16\))); then + elif ((ccode<16&&ccode<_ble_term_colors)); then if ((prefix==4)); then ret=${_ble_term_sgr_ab[ccode]} else diff --git a/src/decode.sh b/src/decode.sh index 9c21a231..f20919f6 100644 --- a/src/decode.sh +++ b/src/decode.sh @@ -2847,7 +2847,7 @@ function ble/encoding:UTF-8/decode { local mode=$_ble_decode_byte__utf_8__mode local byte=$1 local cha0= char= - ((' + (( byte&=0xFF, (mode!=0&&(byte&0xC0)!=0x80)&&( cha0=_ble_decode_Erro|code,mode=0 @@ -2886,7 +2886,7 @@ function ble/encoding:UTF-8/decode { ) ) ) - ')) + )) _ble_decode_byte__utf_8__code=$code _ble_decode_byte__utf_8__mode=$mode diff --git a/src/edit.sh b/src/edit.sh index 2f56a2a3..f1baa328 100644 --- a/src/edit.sh +++ b/src/edit.sh @@ -2250,10 +2250,10 @@ function ble/widget/.insert-string { local dx=${#ins} ble-edit/content/replace "$_ble_edit_ind" "$_ble_edit_ind" "$ins" - ((' + (( _ble_edit_mark>_ble_edit_ind&&(_ble_edit_mark+=dx), _ble_edit_ind+=dx - ')) + )) _ble_edit_mark_active= }