diff --git a/src/spellcheck/spellcheck.cpp b/src/spellcheck/spellcheck.cpp --- a/src/spellcheck/spellcheck.cpp +++ b/src/spellcheck/spellcheck.cpp @@ -176,8 +176,7 @@ int attr = kateTextLine->attribute(i); const KatePrefixStore &prefixStore = highlighting->getCharacterEncodingsPrefixStore(attr); QString prefixFound = prefixStore.findPrefix(kateTextLine, i); - unsigned int attribute = kateTextLine->attribute(i); - if (!document->highlight()->attributeRequiresSpellchecking(attribute) + if (!document->highlight()->attributeRequiresSpellchecking(static_cast(attr)) && prefixFound.isEmpty()) { if (i == start) { ++i;