From 1d5bc7669fd01f9a66c5d09c4ff15877ffe9325f Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 24 Apr 2009 18:21:31 +0000 Subject: [PATCH] Fix cursor position when moving through the history --- deluge/ui/console/screen.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deluge/ui/console/screen.py b/deluge/ui/console/screen.py index 3bbc97a4d..ab05d4aa7 100644 --- a/deluge/ui/console/screen.py +++ b/deluge/ui/console/screen.py @@ -301,15 +301,18 @@ class Screen(CursesStdIO): # Going back in the history self.input_history_index -= 1 self.input = self.input_history[self.input_history_index] + self.input_cursor = len(self.input) elif c == curses.KEY_DOWN: if self.input_history_index + 1 < len(self.input_history): # Going forward in the history self.input_history_index += 1 self.input = self.input_history[self.input_history_index] + self.input_cursor = len(self.input) elif self.input_history_index + 1 == len(self.input_history): # We're moving back down to an incomplete input self.input_history_index += 1 self.input = self.input_incomplete + self.input_cursor = len(self.input) # Cursor movement elif c == curses.KEY_LEFT: