Use Python regex for spell checking

This commit is contained in:
Veronica Berglyd Olsen
2024-09-22 16:23:35 +02:00
parent 1aa58c047f
commit cb8933b493
3 changed files with 27 additions and 27 deletions
+2 -2
View File
@@ -107,8 +107,8 @@ class GuiTextDocument(QTextDocument):
text = block.text()
check = pos - block.position()
if check >= 0:
for cPos, cLen in data.spellErrors:
cEnd = cPos + cLen
for cPos, cEnd in data.spellErrors:
cLen = cEnd - cPos
if cPos <= check <= cEnd:
word = text[cPos:cEnd]
return word, cPos, cLen, SHARED.spelling.suggestWords(word)