summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-13 12:32:28 +0200
committerhut <hut@lavabit.com>2010-04-13 12:38:40 +0200
commit01e4ea98c12a28362968a8b23483d260755838e5 (patch)
treee13c87f6f2d59ad5528f8d21443e09687f40917a
parent76aee8ea8d40a52639a52bd3d6ade13d85159ca0 (diff)
downloadranger-01e4ea98c12a28362968a8b23483d260755838e5.tar.gz
gui.bar: Fixed Zero Division Error
-rw-r--r--ranger/gui/bar.py3
1 files changed, 2 insertions, 1 deletions
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:
f='#n125'>125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183