From cd8e483f3a4a87d9c7a0adffe6f703a70a1de395 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 10 Aug 2009 21:17:08 +0000 Subject: [PATCH] Text::dispatch(): the spellchecking code is now uneeded. 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 | 4 ---- src/TextMetrics.cpp | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Text3.cpp b/src/Text3.cpp index e2c2dff3ec..b551f96397 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -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 diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 178d0c97c4..3c2312eb04 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -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 -- 2.39.5