mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Fix startup with no state.
Bug introduced in previous patch.
This commit is contained in:
parent
df3d2d70ed
commit
a21c989ccd
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user