]> git.lyx.org Git - features.git/commitdiff
use correct comparison
authorLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 13 Mar 2002 23:13:35 +0000 (23:13 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 13 Mar 2002 23:13:35 +0000 (23:13 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3749 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/paragraph.C

index 81a2719a0a0f7f8948d70360316a8bb2b2bcfd85..70499354d8375ef2cbf836408db91f052c7626a7 100644 (file)
@@ -1,3 +1,9 @@
+2002-03-14  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * paragraph.C (getFontSettings): compare >= not just >
+       (highestFontInRange): ditto
+       (setFont): ditto
+
 2002-03-13  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * paragraph.C: change several algorithm to be more appripriate for
index 159b82ef91928e3fe33b5600acc4039bb870f846..29006e1dde6734502fde9bb7566fec5d0c955b33 100644 (file)
@@ -595,7 +595,7 @@ LyXFont const Paragraph::getFontSettings(BufferParams const & bparams,
        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 startpos, pos_type endpos,
        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 startpos, pos_type endpos,
 
        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, LyXFont const & font)
        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);