From 2d81b7407b6570303e920a58894ede3eeb7e2a80 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 20 Mar 2011 03:32:48 +0100 Subject: Alt+J --- src/core.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src') 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 -- cgit v1.2.3