Alt+J
This commit is contained in:
parent
356dd4b5ec
commit
2d81b7407b
1 changed files with 18 additions and 0 deletions
18
src/core.py
18
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
|
||||
|
|
Loading…
Reference in a new issue