]> git.lyx.org Git - features.git/commitdiff
Text::dispatch(): the spellchecking code is now uneeded.
authorAbdelrazak Younes <younes@lyx.org>
Mon, 10 Aug 2009 21:17:08 +0000 (21:17 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 10 Aug 2009 21:17:08 +0000 (21:17 +0000)
TextMetrics::drawParagraph(): really check the whole row and not only the first word.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30971 a592a061-630c-0410-9148-cb99ea01b6c8

src/Text3.cpp
src/TextMetrics.cpp

index e2c2dff3ec3c1c35d705a5b0713e05b71b9168b8..b551f96397a37e3faef02e1ed2393494e2471235 100644 (file)
@@ -2126,10 +2126,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                break;
        }
 
-       if (lyxrc.spellcheck_continuously && cur.inTexted())
-               // Take this opportunity to spellcheck current word.
-               cur.paragraph().isMisspelled(cur.pos());
-
        needsUpdate |= (cur.pos() != cur.lastpos()) && cur.selection();
 
        // FIXME: The cursor flag is reset two lines below
index 178d0c97c44df8fbab2b44674daefe00d771879a..3c2312eb047de4dcf8dd918246d2a1d2f85e1b4a 100644 (file)
@@ -2103,7 +2103,10 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type pit, int x, int y) co
                        static docstring_list suggestions;
                        pos_type from = row.pos();
                        pos_type to = row.endpos();
-                       text_->getPar(pit).spellCheck(from, to, wl, suggestions, false);
+                       while (from < row.endpos()) {
+                               text_->getPar(pit).spellCheck(from, to, wl, suggestions, false);
+                               from = to + 1;
+                       }
                }
 
                // Don't paint the row if a full repaint has not been requested