aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-02-08 17:55:17 +1300
committerAldo Cortesi <aldo@nullcube.com>2012-02-08 17:55:17 +1300
commit4026aa2e5f6929633b4800d55cf26698f9dd3c40 (patch)
tree41ec4500d77b239fa0d84ce816e8ce13e7b324d7
parentd41095c35ee49bf85a31a1830638fcc30afbe28e (diff)
downloadmitmproxy-4026aa2e5f6929633b4800d55cf26698f9dd3c40.tar.gz
mitmproxy-4026aa2e5f6929633b4800d55cf26698f9dd3c40.tar.bz2
mitmproxy-4026aa2e5f6929633b4800d55cf26698f9dd3c40.zip
KVEditor: make tab behaviour nicer
If we tab while editing, stop editing if we are taken to the next row.
-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 95b703be..40387a56 100644
--- a/libmproxy/console/kveditor.py
+++ b/libmproxy/console/kveditor.py
@@ -167,8 +167,10 @@ class KVEditor(common.WWrap):
if key in ["esc", "enter"]:
self.walker.stop_edit()
elif key == "tab":
+ pf = self.walker.focus
self.walker.tab_next()
- self.walker.start_edit()
+ if self.walker.focus == pf:
+ self.walker.start_edit()
else:
self.w.keypress(size, key)
return None