eric6/QScintilla/Editor.py

changeset 8205
4a0f1f896341
parent 8193
2aa8953a2145
child 8217
385f60c94548
--- a/eric6/QScintilla/Editor.py	Thu Apr 08 17:27:12 2021 +0200
+++ b/eric6/QScintilla/Editor.py	Thu Apr 08 18:27:47 2021 +0200
@@ -3693,7 +3693,7 @@
         ch = self.charAt(pos)
         
         # Don't go past the end of the previous line
-        if ch == '\n' or ch == '\r':
+        if ch in ('\n', '\r'):
             return "", pos
         
         return ch, pos
@@ -6383,7 +6383,7 @@
         seline = self.markerFindNext(0, 1 << self.syntaxerror)
         if seline >= 0:
             index = 0
-            for handle in self.syntaxerrors.keys():
+            for handle in self.syntaxerrors:
                 if self.markerLine(handle) == seline:
                     index = self.syntaxerrors[handle][0][1]
             self.setCursorPosition(seline, index)
@@ -6689,7 +6689,7 @@
             styleAnnotations = []
             
             # step 1: do warnings
-            for handle in self.warnings.keys():
+            for handle in self.warnings:
                 if self.markerLine(handle) == line:
                     for msg, warningType in self.warnings[handle]:
                         if warningType == self.WarningStyle:
@@ -6700,7 +6700,7 @@
                                 self.tr("Warning: {0}").format(msg))
             
             # step 2: do syntax errors
-            for handle in self.syntaxerrors.keys():
+            for handle in self.syntaxerrors:
                 if self.markerLine(handle) == line:
                     for msg, _ in self.syntaxerrors[handle]:
                         errorAnnotations.append(

eric ide

mercurial