diff options
author | Adam Lerer <adam.lerer@gmail.com> | 2015-02-07 00:43:40 +0300 |
---|---|---|
committer | Adam Lerer <adam.lerer@gmail.com> | 2015-02-07 00:43:40 +0300 |
commit | f18cce06e64f3aab73370470c9412e459290836f (patch) | |
tree | 613796c051b4590d3e8ce4c4c07003d09c744377 /init.lua | |
parent | bf8eb60946ac8f0bfd382e4dbadeaaa9e745a0e5 (diff) |
Minor improvement to progress bar
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -246,8 +246,6 @@ do local termLength = getTermLength() function progress(current, goal) -- defaults: - for i=1,termLength do glob.io.write(' ') end - for i=1,termLength do glob.io.write('\b') end local barLength = termLength - 34 local smoothing = 100 local maxfps = 10 @@ -278,6 +276,8 @@ do else glob.io.write('.') end end glob.io.write('] ') + for i=1,termLength-barLength-4 do glob.io.write(' ') end + for i=1,termLength-barLength-4 do glob.io.write('\b') end -- time stats local elapsed = timer:time().real local step = (elapsed-times[1]) / (current-indices[1]) |