diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-03-20 03:32:48 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-03-20 03:32:48 +0100 |
commit | 2d81b7407b6570303e920a58894ede3eeb7e2a80 (patch) | |
tree | fc7d4878246ae8b8e1e07f51bd48b9a32da57236 /src | |
parent | 356dd4b5ecf01a4ff130d5822a19f7a080404672 (diff) | |
download | poezio-2d81b7407b6570303e920a58894ede3eeb7e2a80.tar.gz poezio-2d81b7407b6570303e920a58894ede3eeb7e2a80.tar.bz2 poezio-2d81b7407b6570303e920a58894ede3eeb7e2a80.tar.xz poezio-2d81b7407b6570303e920a58894ede3eeb7e2a80.zip |
Alt+J
Diffstat (limited to 'src')
-rw-r--r-- | src/core.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core.py b/src/core.py index aa3487f0..e08243bc 100644 --- a/src/core.py +++ b/src/core.py @@ -142,6 +142,7 @@ class Core(object): 'M-z': self.go_to_previous_tab, 'M-v': self.move_separator, '^L': self.full_screen_redraw, + 'M-j': self.go_to_room_number, } # Add handlers @@ -1242,6 +1243,23 @@ class Core(object): del tab self.refresh_window() + def go_to_room_number(self): + """ + Read 2 more chars and go to the tab + with the given number + """ + char = read_char(self.stdscr) + try: + nb1 = int(char) + except ValueError: + return + char = read_char(self.stdscr) + try: + nb2 = int(char) + except ValueError: + return + self.command_win('%s%s' % (nb1, nb2)) + def move_separator(self): """ Move the new-messages separator at the bottom on the current |