From be4fc62a1faa1e81f7a0d9e48fc525c1fd5b1b46 Mon Sep 17 00:00:00 2001 From: John Levon Date: Fri, 28 Mar 2003 04:04:36 +0000 Subject: [PATCH] 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 --- src/ChangeLog | 4 ++++ src/text2.C | 3 +++ 2 files changed, 7 insertions(+) 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); -- 2.39.2