This commit is contained in:
Florent Le Coz 2011-03-20 03:32:48 +01:00
parent 356dd4b5ec
commit 2d81b7407b

View file

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