diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 627159826a..c9dadd0837 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3385,8 +3385,10 @@ int Buffer::spellCheck(DocIterator & from, DocIterator & to, while (from.inMathed()) from.forwardInset(); to = from; - if (from.paragraph().spellCheck(from.pos(), to.pos(), wl, suggestions)) + if (from.paragraph().spellCheck(from.pos(), to.pos(), wl, suggestions)) { + word_lang = wl; break; + } from = to; ++progress; }