]> git.lyx.org Git - features.git/commitdiff
save the correct last position of misspelled words in spell checker state (thanks...
authorStephan Witt <switt@lyx.org>
Fri, 28 Jan 2011 07:01:38 +0000 (07:01 +0000)
committerStephan Witt <switt@lyx.org>
Fri, 28 Jan 2011 07:01:38 +0000 (07:01 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37340 a592a061-630c-0410-9148-cb99ea01b6c8

src/Paragraph.cpp

index c7aa8b9513c86b706a9b575636aa760385806350..3036d4576310c9b7bc8481dbb7a6be2baae51ab3 100644 (file)
@@ -391,12 +391,9 @@ public:
        {
                pos_type textsize = owner_->size();
                // check for sane arguments
-               if (to < from || from >= textsize)
+               if (to <= from || from >= textsize)
                        return;
-               FontSpan fp = FontSpan(from, to);
-               // don't mark end of paragraph
-               if (fp.last >= textsize)
-                       fp.last = textsize - 1;
+               FontSpan fp = FontSpan(from, to - 1);
                speller_state_.setRange(fp, state);
        }