QScintilla/SpellChecker.py

changeset 4322
b4163b6ae674
parent 4295
3ec4679c3dcd
child 4563
881340f4bd0c
child 4632
ca310db386ed
equal deleted inserted replaced
4321:28d39909a480 4322:b4163b6ae674
341 for pos in [pos0, pos1]: 341 for pos in [pos0, pos1]:
342 if self.editor.charAt(pos).isalnum(): 342 if self.editor.charAt(pos).isalnum():
343 line, index = self.editor.lineIndexFromPosition(pos) 343 line, index = self.editor.lineIndexFromPosition(pos)
344 word = self.editor.getWord(line, index, useWordChars=False) 344 word = self.editor.getWord(line, index, useWordChars=False)
345 if len(word) >= self.minimumWordSize: 345 if len(word) >= self.minimumWordSize:
346 ok = spell.check(word) 346 try:
347 ok = spell.check(word)
348 except enchant.errors.Error:
349 ok = True
347 else: 350 else:
348 ok = True 351 ok = True
349 start, end = self.editor.getWordBoundaries( 352 start, end = self.editor.getWordBoundaries(
350 line, index, useWordChars=False) 353 line, index, useWordChars=False)
351 if ok: 354 if ok:

eric ide

mercurial