AssistantEric/Assistant.py

changeset 38
55f259fad55b
parent 36
d4d279e10fa8
child 39
7b6ca9397ecc
diff -r 426b801f5904 -r 55f259fad55b AssistantEric/Assistant.py
--- a/AssistantEric/Assistant.py	Mon Sep 26 19:29:32 2011 +0200
+++ b/AssistantEric/Assistant.py	Fri Sep 30 18:19:21 2011 +0200
@@ -299,10 +299,10 @@
         col = len(beg)
         wsep = editor.getLexer().autoCompletionWordSeparators()
         if wsep:
-            if beg[col - 1] in wsep:
+            if col > 0 and beg[col - 1] in wsep:
                 col -= 1
             else:
-                while col >= 0 and beg[col - 1] not in wsep:
+                while col > 0 and beg[col - 1] not in wsep:
                     col -= 1
                 if col >= 0:
                     col -= 1
@@ -617,10 +617,10 @@
         col = len(beg)
         wsep = editor.getLexer().autoCompletionWordSeparators()
         if wsep:
-            if beg[col - 1] in wsep:
+            if col > 0 and beg[col - 1] in wsep:
                 col -= 1
             else:
-                while col >= 0 and beg[col - 1] not in wsep + [" ", "\t"]:
+                while col > 0 and beg[col - 1] not in wsep + [" ", "\t"]:
                     col -= 1
                 if col >= 0:
                     col -= 1

eric ide

mercurial