]> git.lyx.org Git - features.git/commitdiff
correct implementation of "mark whole paragraph" for spell check
authorStephan Witt <switt@lyx.org>
Sat, 20 Aug 2011 13:48:19 +0000 (13:48 +0000)
committerStephan Witt <switt@lyx.org>
Sat, 20 Aug 2011 13:48:19 +0000 (13:48 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39501 a592a061-630c-0410-9148-cb99ea01b6c8

src/Paragraph.cpp

index 8ba663939b563fa170b6d6988fb37380f054df0f..39f2df0b7f56ccc13498ef61247e359c229ee959 100644 (file)
@@ -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);
 }