From: Abdelrazak Younes Date: Mon, 22 Jun 2009 21:00:48 +0000 (+0000) Subject: Buffer::spellCheck(): don't spellcheck math. X-Git-Tag: 2.0.0~6229 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5b2ba34ac6b03fdbfc63d83c4c0e80e1d7d7e90a;p=lyx.git Buffer::spellCheck(): don't spellcheck math. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30227 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index d4aef40b13..3c8e878c0b 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3378,14 +3378,12 @@ int Buffer::spellCheck(DocIterator & from, DocIterator & to, WordLangTuple wl; suggestions.clear(); word_lang = WordLangTuple(); - - // We are only interested in text so remove the math CursorSlice. - while (from.inMathed()) - from.pop_back(); - // OK, we start from here. DocIterator const end = doc_iterator_end(this); for (; from != end; from.forwardPos()) { + // We are only interested in text so remove the math CursorSlice. + while (from.inMathed()) + from.pop_back(); to = from; if (from.paragraph().spellCheck(from.pos(), to.pos(), wl, suggestions)) break;