Author: johannes
Date: 2007-01-09 04:55:35 -0600 (Tue, 09 Jan 2007)
New Revision: 9237
Modified:
trunk/gnue-forms/src/input/displayHandlers/Cursor.py
Log:
Proper handling of autocomplete
Modified: trunk/gnue-forms/src/input/displayHandlers/Cursor.py
===================================================================
--- trunk/gnue-forms/src/input/displayHandlers/Cursor.py 2007-01-09
10:08:39 UTC (rev 9236)
+++ trunk/gnue-forms/src/input/displayHandlers/Cursor.py 2007-01-09
10:55:35 UTC (rev 9237)
@@ -319,7 +319,10 @@
return
# If text was added at the end, do autocompletion.
- if new_cursor == len(new_text) and len(new_text) > len(self.display):
+ ende = len(self.display)
+ if self._selection1 or self._selection2:
+ ende = min(self._selection1, self._selection2)
+ if new_cursor == len(new_text) and len(new_text) > ende:
new_text = self.field.autocomplete(new_text)
if len(new_text) > new_cursor:
new_selection = (new_cursor, len(new_text))
_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue