fix overflow glitch in progress bar
This commit is contained in:
parent
cc18a1e9ff
commit
6906fff17b
2
init.lua
2
init.lua
@ -96,7 +96,7 @@ local utf8_len_2=string.find("▒X", "X")-1
|
||||
|
||||
local function indicator(maxVal, curVal)
|
||||
local percent_val = math.floor(curVal / maxVal * 100)
|
||||
local v = math.ceil(percent_val / 10)
|
||||
local v = math.min(math.ceil(percent_val / 10), 10)
|
||||
|
||||
return "\n"
|
||||
..string.sub("▓▓▓▓▓▓▓▓▓▓", 1, v*utf8_len_1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user