KVEditor: make tab behaviour nicer

If we tab while editing, stop editing if we are taken to the next row.
This commit is contained in:
Aldo Cortesi
2012-02-08 17:55:17 +13:00
parent d41095c35e
commit 4026aa2e5f

View File

@@ -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