Buffer::spellCheck(): don't spellcheck math.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30227 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2009-06-22 21:00:48 +00:00
parent d9ce39844f
commit 5b2ba34ac6

View File

@ -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;