John Levon <[EMAIL PROTECTED]> writes:

| Load Intro.lyx and look at the "You tell LyX what you're doing".
>
| A fencepost error, but they accumulate in the saved version.
>
| The fix is attached. I don't know/care if it's right.

This should fix this and the rest of them, please test.

Index: src/paragraph.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.197
diff -u -p -r1.197 paragraph.C
--- src/paragraph.C     13 Mar 2002 18:23:37 -0000      1.197
+++ src/paragraph.C     13 Mar 2002 22:59:02 -0000
@@ -595,7 +595,7 @@ LyXFont const Paragraph::getFontSettings
        Pimpl::FontList::const_iterator cit = pimpl_->fontlist.begin();
        Pimpl::FontList::const_iterator end = pimpl_->fontlist.end();
        for (; cit != end; ++cit) {
-               if (cit->pos() > pos)
+               if (cit->pos() >= pos)
                        break;
        }
 
@@ -695,7 +695,7 @@ Paragraph::highestFontInRange(pos_type s
        Pimpl::FontList::const_iterator end_it = pimpl_->fontlist.begin();
        Pimpl::FontList::const_iterator end = pimpl_->fontlist.end();
        for (; end_it != end; ++end_it) {
-               if (end_it->pos() > endpos)
+               if (end_it->pos() >= endpos)
                        break;
        }
 
@@ -704,7 +704,7 @@ Paragraph::highestFontInRange(pos_type s
 
        Pimpl::FontList::const_iterator cit = pimpl_->fontlist.begin();
        for (; cit != end; ++cit) {
-               if (cit->pos() > startpos)
+               if (cit->pos() >= startpos)
                        break;
        }
 
@@ -776,7 +776,7 @@ void Paragraph::setFont(pos_type pos, Ly
        Pimpl::FontList::iterator it = beg;
        Pimpl::FontList::iterator endit = pimpl_->fontlist.end();
        for (; it != endit; ++it) {
-               if (it->pos() > pos)
+               if (it->pos() >= pos)
                        break;
        }
        unsigned int i = std::distance(beg, it);

-- 
        Lgb

Reply via email to