QScintilla/SpellChecker.py

branch
6_0_x
changeset 4323
572ac5a5cbc4
parent 4296
2adf3457248f
child 4563
881340f4bd0c
child 4632
ca310db386ed
equal deleted inserted replaced
4319:4b8309feef42 4323:572ac5a5cbc4
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