Editor: fixed an issue caused by an invalid string index.

Tue, 05 May 2020 18:06:35 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 05 May 2020 18:06:35 +0200
changeset 7575
3ebd1db41c15
parent 7574
3fbc430c4091
child 7576
72fa014332aa

Editor: fixed an issue caused by an invalid string index.

eric6/QScintilla/Editor.py file | annotate | diff | comparison | revisions
diff -r 3fbc430c4091 -r 3ebd1db41c15 eric6/QScintilla/Editor.py
--- a/eric6/QScintilla/Editor.py	Mon May 04 17:20:19 2020 +0200
+++ b/eric6/QScintilla/Editor.py	Tue May 05 18:06:35 2020 +0200
@@ -5144,7 +5144,8 @@
                 elif wLeft:
                     txt = txt[len(wLeft):]
                 
-                if txt[0] in "'\"":  # New in jedi 0.16: AC of dict keys
+                if txt and txt[0] in "'\"":
+                    # New in jedi 0.16: AC of dict keys
                     txt = txt[1:]
             self.insert(txt)
             self.endUndoAction()

eric ide

mercurial