Use more consistent formatting in arithmetic expressions to make it more clear where they start and end

This commit is contained in:
Kevin MacMartin 2023-08-23 21:36:08 -04:00
parent 8673d1509d
commit f06d4a5cb0

6
vnotes
View file

@ -168,7 +168,7 @@ function search_notes {
maxcolumns=0 maxcolumns=0
while (( 1 )); do while (( 1 )); do
(( (( max_docwidth + 8) * maxcolumns) > screen_width )) && { (( ((max_docwidth + 8) * maxcolumns) > screen_width )) && {
(( maxcolumns-- )) (( maxcolumns-- ))
break break
} }
@ -198,7 +198,7 @@ function search_notes {
cnt=1 cnt=1
for (( x=0; x<${#documents[*]}; x++ )); do for (( x=0; x<${#documents[*]}; x++ )); do
count_display=$(printf "%${digits}s" "$((x+1))") count_display=$(printf "%${digits}s" "$(( x + 1 ))")
count_display="${count_display//\ /0}" count_display="${count_display//\ /0}"
(( x )) || one_display="$count_display" (( x )) || one_display="$count_display"
printf "${c_b}[%${digits}s]$c_c$c_u%$(( max_docwidth + 1 ))s$c_c" "$count_display" "${documents[$x]}" printf "${c_b}[%${digits}s]$c_c$c_u%$(( max_docwidth + 1 ))s$c_c" "$count_display" "${documents[$x]}"
@ -247,7 +247,7 @@ function search_notes {
case "$keypress" in case "$keypress" in
'177'|'010'|'033 133 063 176') '177'|'010'|'033 133 063 176')
# Backspace # Backspace
[[ -n "$value" ]] && value="${value:0:$((${#value}-1))}" [[ -n "$value" ]] && value="${value:0:$(( ${#value} - 1 ))}"
;; ;;
"$alpha_q"|"$alpha_Q") value='-1'; break ;; "$alpha_q"|"$alpha_Q") value='-1'; break ;;