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
This commit is contained in:
John Levon 2003-03-28 04:04:36 +00:00
parent 4f92fc4027
commit be4fc62a1f
2 changed files with 7 additions and 0 deletions

View 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:

View 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);