mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-07 17:08:42 +00:00
Add scrolling with page_up and page_down
This commit is contained in:
parent
204f055c7e
commit
c267c36b7b
1 changed files with 13 additions and 0 deletions
|
@ -324,6 +324,19 @@ class Screen(CursesStdIO):
|
||||||
elif c == curses.KEY_END:
|
elif c == curses.KEY_END:
|
||||||
self.input_cursor = len(self.input)
|
self.input_cursor = len(self.input)
|
||||||
|
|
||||||
|
# Scrolling through buffer
|
||||||
|
elif c == curses.KEY_PPAGE:
|
||||||
|
self.display_lines_offset += self.rows - 3
|
||||||
|
if self.display_lines_offset > (len(self.lines) - 1 - self.rows - 3):
|
||||||
|
self.display_lines_offset = len(self.lines) - 1 - self.rows - 3
|
||||||
|
|
||||||
|
self.refresh()
|
||||||
|
elif c == curses.KEY_NPAGE:
|
||||||
|
self.display_lines_offset -= self.rows - 3
|
||||||
|
if self.display_lines_offset < 0:
|
||||||
|
self.display_lines_offset = 0
|
||||||
|
self.refresh()
|
||||||
|
|
||||||
# Delete a character in the input string based on cursor position
|
# Delete a character in the input string based on cursor position
|
||||||
if c == curses.KEY_BACKSPACE or c == 127:
|
if c == curses.KEY_BACKSPACE or c == 127:
|
||||||
if self.input and self.input_cursor > 0:
|
if self.input and self.input_cursor > 0:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue