]> git.lyx.org Git - lyx.git/commitdiff
fix bug 974 (end on empty par gives internal warning)
authorJohn Levon <levon@movementarian.org>
Fri, 28 Mar 2003 04:04:36 +0000 (04:04 +0000)
committerJohn Levon <levon@movementarian.org>
Fri, 28 Mar 2003 04:04:36 +0000 (04:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6606 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/text2.C

index 4b80f677fdba7bb44edf0f1b041d82ae10974a62..9392f6b5fea9401d4a671586dfefd9debd7a8af9 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-28  John Levon  <levon@movementarian.org>
+
+       * text2.C: fix bug 974 (End on empty par)
+
 2003-03-28  John Levon  <levon@movementarian.org>
 
        * BufferView_pimpl.C:
index 2f83d8679761970a259f82512fce01bce3fa6dc4..ccc7b30bc15f4029617d43a9356d4aaca7941057 100644 (file)
@@ -919,6 +919,9 @@ void LyXText::cursorHome()
 
 void LyXText::cursorEnd()
 {
+       if (cursor.par()->empty())
+               return;
+
        if (!cursor.row()->next()
            || cursor.row()->next()->par() != cursor.row()->par()) {
                setCursor(cursor.par(), cursor.row()->lastPos() + 1);