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
This commit is contained in:
Abdelrazak Younes 2009-08-10 21:17:08 +00:00
parent 0cc197d3c1
commit cd8e483f3a
2 changed files with 4 additions and 5 deletions

View 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

View 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