summaryrefslogtreecommitdiffstats
path: root/bl
diff options
context:
space:
mode:
Diffstat (limited to 'bl')
-rwxr-xr-xbl5
1 files changed, 5 insertions, 0 deletions
diff --git a/bl b/bl
index c928519..d66422b 100755
--- a/bl
+++ b/bl
@@ -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