From: John Levon Date: Fri, 28 Mar 2003 04:04:36 +0000 (+0000) Subject: fix bug 974 (end on empty par gives internal warning) X-Git-Tag: 1.6.10~17147 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=be4fc62a1faa1e81f7a0d9e48fc525c1fd5b1b46;p=lyx.git fix bug 974 (end on empty par gives internal warning) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6606 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 4b80f677fd..9392f6b5fe 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2003-03-28 John Levon + + * text2.C: fix bug 974 (End on empty par) + 2003-03-28 John Levon * BufferView_pimpl.C: diff --git a/src/text2.C b/src/text2.C index 2f83d86797..ccc7b30bc1 100644 --- a/src/text2.C +++ b/src/text2.C @@ -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);