QScintilla/TypingCompleters/CompleterRuby.py

changeset 431
96cc7d322f89
parent 97
c4086afea02b
child 791
9ec2ac20e54e
--- a/QScintilla/TypingCompleters/CompleterRuby.py	Thu Jul 29 17:25:00 2010 +0200
+++ b/QScintilla/TypingCompleters/CompleterRuby.py	Thu Jul 29 18:34:15 2010 +0200
@@ -84,7 +84,8 @@
         # closing parenthesis
         # skip matching closing parenthesis
         elif char in [')', '}', ']']:
-            if char == self.editor.text(line)[col]:
+            txt = self.editor.text(line)
+            if col < len(txt) and char == txt[col]:
                 if self.__skipBrace:
                     self.editor.setSelection(line, col, line, col + 1)
                     self.editor.removeSelectedText()

eric ide

mercurial