]> git.lyx.org Git - features.git/commitdiff
Buffer::spellCheck(): don't spellcheck math.
authorAbdelrazak Younes <younes@lyx.org>
Mon, 22 Jun 2009 21:00:48 +0000 (21:00 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 22 Jun 2009 21:00:48 +0000 (21:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30227 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp

index d4aef40b13ff0652abf4b079ef7ab8007884c8e9..3c8e878c0b1ed2e74780660ac0d774c91ca49ab3 100644 (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;