feat: add support for scrolling up with Shift+Space in different terminals
This commit is contained in:
parent
b6ec425d91
commit
07127c1d1b
|
|
@ -151,7 +151,9 @@ def main(stdscr, filename):
|
|||
scroll_offset -= 1
|
||||
elif key in [curses.KEY_NPAGE, ord(' ')]:
|
||||
scroll_offset = min(scroll_offset + height - 1, max_scroll)
|
||||
elif key in [curses.KEY_PPAGE, 8, 127]: # Page Up or Shift+Space (some terminals)
|
||||
elif key in [curses.KEY_PPAGE, 8, 127, curses.KEY_SR]: # Page Up, Backspace, Delete, or Shift+Up
|
||||
scroll_offset = max(0, scroll_offset - (height - 1))
|
||||
elif key == curses.KEY_BACKSPACE: # Another way to detect Shift+Space in some terminals
|
||||
scroll_offset = max(0, scroll_offset - (height - 1))
|
||||
|
||||
# Pane switching
|
||||
|
|
|
|||
Loading…
Reference in New Issue