From 01e4ea98c12a28362968a8b23483d260755838e5 Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 13 Apr 2010 12:32:28 +0200 Subject: gui.bar: Fixed Zero Division Error --- ranger/gui/bar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ranger/gui/bar.py b/ranger/gui/bar.py index 8b8eb33c..f5e34eb1 100644 --- a/ranger/gui/bar.py +++ b/ranger/gui/bar.py @@ -68,7 +68,8 @@ class Bar(object): rightsize = self.right.sumsize() nonfixed_items = self.left.nonfixed_items() - itemsize = int(float(wid - rightsize - fixedsize) / nonfixed_items) + 1 + itemsize = int(float(wid - rightsize - fixedsize) / \ + (nonfixed_items + 1)) + 1 for item in self.left: if not item.fixed: -- cgit 1.4.1-2-gfad0