--- 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