Fix startup with no state.

Bug introduced in previous patch.
This commit is contained in:
Aldo Cortesi 2013-07-28 22:40:51 +12:00
parent df3d2d70ed
commit a21c989ccd

View File

@ -204,6 +204,9 @@ class StatusBar(common.WWrap):
self.message("")
fc = self.master.state.flow_count()
if self.master.state.focus is None:
offset = 0
else:
offset = min(self.master.state.focus + 1, fc)
t = [
('heading', ("[%s/%s]"%(offset, fc)).ljust(9))