diff options
-rwxr-xr-x | bl | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -121,6 +121,11 @@ get_raw_new() { esac if [ -n "$new" ]; then : $(( raw_new = new * raw_max / max )) + if [ "$new" -lt "$curr" ] && [ "$raw_new" -ge "$raw_curr" ]; then + : $(( raw_new = raw_curr - 1 )) + elif [ "$new" -gt "$curr" ] && [ "$raw_new" -le "$raw_curr" ]; then + : $(( raw_new = raw_curr + 1 )) + fi fi if [ -n "$raw_new" ]; then if [ "$raw_new" -gt "$raw_max" ]; then |