diff --git a/plugins/grazie/src/main/kotlin/com/intellij/grazie/spellcheck/GrazieSpellchecker.kt b/plugins/grazie/src/main/kotlin/com/intellij/grazie/spellcheck/GrazieSpellchecker.kt index 19e06d70516e..dabf9d6dc954 100644 --- a/plugins/grazie/src/main/kotlin/com/intellij/grazie/spellcheck/GrazieSpellchecker.kt +++ b/plugins/grazie/src/main/kotlin/com/intellij/grazie/spellcheck/GrazieSpellchecker.kt @@ -63,7 +63,8 @@ class GrazieCheckers(coroutineScope: CoroutineScope) : GrazieStateLifecycle { return synchronized(speller) { computeWithClassLoader(GraziePlugin.classLoader) { val sentence = tool.getRawAnalyzedSentence(word) - if (sentence.nonWhitespaceTokenCount == 1) return@computeWithClassLoader !speller.isMisspelled(word) + // First token is always sentence start + if (sentence.nonWhitespaceTokenCount <= 2) return@computeWithClassLoader !speller.isMisspelled(word) if (speller.match(sentence).isEmpty()) { if (!speller.isMisspelled(word)) true else {