From: Armaan Bhojwani Date: Sun, 31 Jan 2021 03:53:46 +0000 (-0500) Subject: Fix calculation of progress X-Git-Tag: v0.1.0~4 X-Git-Url: https://git.armaanb.net/?p=lightcards.git;a=commitdiff_plain;h=9ec6a08a18bed1d50e01b242e01accb3dd5284ec Fix calculation of progress --- diff --git a/lightcards/display.py b/lightcards/display.py index 4dab9e1..0e58870 100755 --- a/lightcards/display.py +++ b/lightcards/display.py @@ -9,7 +9,7 @@ def disp_bar(stdscr, stack, headers, obj): if len(stack) <= 1: percent = "100" else: - percent = str(round(obj.getIdx() / (len(stack)) * 100)).zfill(3) + percent = str(round(obj.getIdx() / (len(stack) - 1) * 100)).zfill(3) stdscr.insstr(mlines - 1, 0, "[" +