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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 19 Jul 2015 17:07:28 +0200
branch
6_0_x
changeset 4323
572ac5a5cbc4
parent 4319
4b8309feef42
child 4328
6420f6f8d9ac

Intercept an error in the spell checker caused by pyenchant doing some strange things.
(grafted from b4163b6ae674aa5d84ffff8c17d4770cd7e80edc)

QScintilla/SpellChecker.py file | annotate | diff | comparison | revisions
--- a/QScintilla/SpellChecker.py	Sun Jul 19 17:02:09 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