]> git.lyx.org Git - features.git/commitdiff
Ensure that "paragraphs().size() - 1" can be used meaningfully in a comparison.
authorAngus Leeming <leeming@lyx.org>
Tue, 15 Feb 2005 19:34:44 +0000 (19:34 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 15 Feb 2005 19:34:44 +0000 (19:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9639 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/rowpainter.C

index db30f1c8fa6a2bf17b83f9b42d4537e69a587b8e..4c4d58568b9305db6e064c6e9adec9236a34e7ee 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-15  Angus Leeming  <leeming@lyx.org>
+
+       * rowpainter.C (paintText): Ensure that "paragraphs().size() - 1"
+       can be used meaningfully in a comparison.
+
 2005-02-13  André Pönitz  <poenitz@gmx.net>
 
        * Cursor.[Ch] (fixIfBroken): new method, try to fix a broken cursor
index c9ceb39510ea8a3cc3fd47d3ab0e521b831d5cae..f4485f889b47d4a8b535e3c04ec050bf90c315f1 100644 (file)
@@ -794,7 +794,7 @@ void paintText(BufferView const & bv, ViewMetricsInfo const & vi)
                         vi.y1 -  text->getPar(vi.p1 - 1).descent());
        }
 
-       if (vi.p2 < text->paragraphs().size() - 1) {
+       if (vi.p2 < lyx::pit_type(text->paragraphs().size()) - 1) {
                text->redoParagraph(vi.p2 + 1);
                paintPar(pi, *bv.text(), vi.p2 + 1, 0,
                         vi.y2 + text->getPar(vi.p2 + 1).ascent());