Intercept an error in the spell checker caused by pyenchant doing some strange things.

Sun, 19 Jul 2015 17:07:28 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 19 Jul 2015 17:07:28 +0200
changeset 4322
b4163b6ae674
parent 4321
28d39909a480
child 4325
3e6dd786a5ff

Intercept an error in the spell checker caused by pyenchant doing some strange things.

QScintilla/SpellChecker.py file | annotate | diff | comparison | revisions
--- a/QScintilla/SpellChecker.py	Sun Jul 19 17:04:14 2015 +0200
+++ b/QScintilla/SpellChecker.py	Sun Jul 19 17:07:28 2015 +0200
@@ -343,7 +343,10 @@
                     line, index = self.editor.lineIndexFromPosition(pos)
                     word = self.editor.getWord(line, index, useWordChars=False)
                     if len(word) >= self.minimumWordSize:
-                        ok = spell.check(word)
+                        try:
+                            ok = spell.check(word)
+                        except enchant.errors.Error:
+                            ok = True
                     else:
                         ok = True
                     start, end = self.editor.getWordBoundaries(

eric ide

mercurial