From 4026aa2e5f6929633b4800d55cf26698f9dd3c40 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 8 Feb 2012 17:55:17 +1300 Subject: KVEditor: make tab behaviour nicer If we tab while editing, stop editing if we are taken to the next row. --- libmproxy/console/kveditor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3