Author: andar
Revision: 5153
Log:
Fix cursor position when moving through the history
Diff:
Modified: trunk/deluge/ui/console/screen.py
===================================================================
--- trunk/deluge/ui/console/screen.py 2009-04-24 18:19:04 UTC (rev 5152)
+++ trunk/deluge/ui/console/screen.py 2009-04-24 18:21:31 UTC (rev 5153)
@@ -301,15 +301,18 @@
# 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:
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---