diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-03-10 05:11:12 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-03-10 05:11:12 +0100 |
commit | e835bd2d20bf9fd678e974c1aec9b3cbe6b9ea08 (patch) | |
tree | 4df24f173c8e235cf577c49f9b5266191c5925aa | |
parent | 36eed51b90d4a5c3c79a317fe59e828050c7e3a0 (diff) | |
download | poezio-e835bd2d20bf9fd678e974c1aec9b3cbe6b9ea08.tar.gz poezio-e835bd2d20bf9fd678e974c1aec9b3cbe6b9ea08.tar.bz2 poezio-e835bd2d20bf9fd678e974c1aec9b3cbe6b9ea08.tar.xz poezio-e835bd2d20bf9fd678e974c1aec9b3cbe6b9ea08.zip |
Fix the search (the enter key opens the conversation BEFORE restoring the roster list)
-rw-r--r-- | src/tabs.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/tabs.py b/src/tabs.py index cafeabc4..ffafc322 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -1042,7 +1042,6 @@ class RosterInfoTab(Tab): self.set_color_state(theme.COLOR_TAB_NORMAL) self.key_func['^I'] = self.completion self.key_func['M-i'] = self.completion - self.key_func["^M"] = self.on_enter self.key_func[' '] = self.on_space self.key_func["/"] = self.on_slash self.key_func["KEY_UP"] = self.move_cursor_up @@ -1179,10 +1178,15 @@ class RosterInfoTab(Tab): self._color_state = color def on_input(self, key): + if key == '^M': + selected_row = self.roster_win.get_selected_row() res = self.input.do_command(key) if res: return True - if key in self.key_func: + if key == '^M': + self.core.on_roster_enter_key(selected_row) + return selected_row + elif key in self.key_func: return self.key_func[key]() def toggle_offline_show(self): @@ -1268,11 +1272,6 @@ class RosterInfoTab(Tab): selected_row.toggle_folded() return True - def on_enter(self): - selected_row = self.roster_win.get_selected_row() - self.core.on_roster_enter_key(selected_row) - return selected_row - def start_search(self): """ Start the search. The input should appear with a short instruction |