Added code to deal with a RecursionError in some very strange spell check situation. eric7

Tue, 13 Dec 2022 17:37:04 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 13 Dec 2022 17:37:04 +0100
branch
eric7
changeset 9618
f58ab8c5816b
parent 9617
6a32a62e55e7
child 9619
7033f25b1462

Added code to deal with a RecursionError in some very strange spell check situation.

src/eric7/QScintilla/SpellChecker.py file | annotate | diff | comparison | revisions
--- a/src/eric7/QScintilla/SpellChecker.py	Tue Dec 13 15:08:14 2022 +0100
+++ b/src/eric7/QScintilla/SpellChecker.py	Tue Dec 13 17:37:04 2022 +0100
@@ -294,7 +294,9 @@
             return
 
         linesChunk = Preferences.getEditor("AutoSpellCheckChunkSize")
-        self.checkLines(self.lastCheckedLine, self.lastCheckedLine + linesChunk)
+        with contextlib.suppress(RecursionError):
+            # that can ahppen in some strange situations
+            self.checkLines(self.lastCheckedLine, self.lastCheckedLine + linesChunk)
         self.lastCheckedLine = self.lastCheckedLine + linesChunk + 1
         if self.lastCheckedLine >= self.editor.lines():
             self.lastCheckedLine = -1

eric ide

mercurial