The latest corrections for http://www.lyx.org/trac/ticket/6776 broke the marking
of the last misspelled word at end of paragraph. The attached patch fixes this.
Ok to apply?

Stephan

Index: src/Paragraph.cpp
===================================================================
--- src/Paragraph.cpp   (Revision 38202)
+++ src/Paragraph.cpp   (Arbeitskopie)
@@ -3781,9 +3781,9 @@
 bool Paragraph::isMisspelled(pos_type pos, bool check_boundary) const
 {
        bool result = SpellChecker::misspelled(d->speller_state_.getState(pos));
-       if (result || pos <= 0 || pos >= size())
+       if (result || pos <= 0 || pos > size())
                return result;
-       if (check_boundary && isWordSeparator(pos))
+       if (check_boundary && (pos == size() || isWordSeparator(pos)))
                result = 
SpellChecker::misspelled(d->speller_state_.getState(pos - 1));
        return result;
 }

Reply via email to