[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9237 - trunk/gnue-forms/src/input/displayHandlers
From: |
johannes |
Subject: |
[gnue] r9237 - trunk/gnue-forms/src/input/displayHandlers |
Date: |
Tue, 9 Jan 2007 04:55:36 -0600 (CST) |
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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9237 - trunk/gnue-forms/src/input/displayHandlers,
johannes <=