From 5b2ba34ac6b03fdbfc63d83c4c0e80e1d7d7e90a Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 22 Jun 2009 21:00:48 +0000 Subject: [PATCH] Buffer::spellCheck(): don't spellcheck math. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30227 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Buffer.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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; -- 2.39.2