summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rwxr-xr-xlua/helpers.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/lua/helpers.lua b/lua/helpers.lua
index 173a472..3718da3 100755
--- a/lua/helpers.lua
+++ b/lua/helpers.lua
@@ -31,7 +31,12 @@ function drawers.gen_info_text(basename, count, factor, stack_max)
-- round the number (float -> int)
percent = math.floor(percent + 0.5)
- return tostring(count) .. " " .. basename .. " (" .. tostring(percent) .. "% full)"
+ if count == 0 then
+ return basename .. " (" .. tostring(percent) .. "% full)"
+ else
+ return tostring(count) .. " " .. basename .. " (" ..
+ tostring(percent) .. "% full)"
+ end
end
function drawers.get_inv_image(name)