feat: add support for scrolling up with Shift+Space in different terminals

This commit is contained in:
n loewen (aider) 2025-05-05 09:14:00 +01:00
parent b6ec425d91
commit 07127c1d1b
1 changed files with 3 additions and 1 deletions

View File

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