Author: andar
Revision: 5183
Log:
Add scrolling with page_up and page_down
Diff:
Modified: trunk/deluge/ui/console/screen.py
===================================================================
--- trunk/deluge/ui/console/screen.py 2009-04-27 13:56:53 UTC (rev 5182)
+++ trunk/deluge/ui/console/screen.py 2009-04-27 17:17:44 UTC (rev 5183)
@@ -324,6 +324,19 @@
elif c == curses.KEY_END:
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
if c == curses.KEY_BACKSPACE or c == 127:
if self.input and self.input_cursor > 0:
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---