aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmproxy/console/kveditor.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/libmproxy/console/kveditor.py b/libmproxy/console/kveditor.py
index 632a6992..e74895bb 100644
--- a/libmproxy/console/kveditor.py
+++ b/libmproxy/console/kveditor.py
@@ -90,7 +90,9 @@ class KVItem(common.WWrap):
class KVWalker(urwid.ListWalker):
def __init__(self, lst):
self.lst = lst
- self.maxk = max(len(v[0]) for v in lst)
+ self.maxk = max(len(v[0]) for v in lst) if lst else 20
+ if self.maxk < 20:
+ self.maxk = 20
self.focus = 0
self.focus_col = 0
self.editing = False