From: Stephan Witt Date: Sat, 20 Aug 2011 13:48:19 +0000 (+0000) Subject: correct implementation of "mark whole paragraph" for spell check X-Git-Tag: 2.1.0beta1~2807 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e92c786618053847a4be97e8a7663a9c9dfd7da3;p=features.git correct implementation of "mark whole paragraph" for spell check git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39501 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 8ba663939b..39f2df0b7f 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -400,7 +400,10 @@ public: } void requestSpellCheck(pos_type pos) { - speller_state_.needsRefresh(pos); + if (pos == -1) + speller_state_.needsCompleteRefresh(speller_state_.currentChangeNumber()); + else + speller_state_.needsRefresh(pos); } void readySpellCheck() { @@ -3606,7 +3609,7 @@ Language * Paragraph::Private::getSpellLanguage(pos_type const from) const void Paragraph::requestSpellCheck(pos_type pos) { - d->requestSpellCheck(pos == -1 ? size() : pos); + d->requestSpellCheck(pos); }