From 00fa07445263c1672085259a1115fea2f072fb50 Mon Sep 17 00:00:00 2001 From: Nick Date: Tue, 1 Feb 2011 18:00:25 +0100 Subject: [PATCH] small fix for scrolling --- deluge/ui/console/modes/alltorrents.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deluge/ui/console/modes/alltorrents.py b/deluge/ui/console/modes/alltorrents.py index f2f264225..98ac48e3f 100644 --- a/deluge/ui/console/modes/alltorrents.py +++ b/deluge/ui/console/modes/alltorrents.py @@ -593,11 +593,13 @@ class AllTorrents(BaseMode): # Navigate the torrent list if c == curses.KEY_UP: + if self.cursel == 1: return if not self._scroll_up(1): effected_lines = [self.cursel-1,self.cursel] elif c == curses.KEY_PPAGE: self._scroll_up(int(self.rows/2)) elif c == curses.KEY_DOWN: + if self.cursel >= self.numtorrents: return if not self._scroll_down(1): effected_lines = [self.cursel-2,self.cursel-1] elif c == curses.KEY_NPAGE: