fix bug 1998

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10410 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2005-09-05 06:50:42 +00:00
parent 7b12cfdafe
commit c8acdbb7c5
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2005-08-26 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* text2.C (cursorEnd): check for empty text (fixes bug 1998)
2005-08-19 Lars Gullik Bjønnes <larsbj@gullik.net>
* CutAndPaste.C (eraseSelectionHelper): fix bug 1920

View File

@ -494,6 +494,9 @@ void LyXText::cursorEnd(LCursor & cur)
// the final space exept if I have a spanning inset or one string
// is so long that we force a break.
pos_type end = cur.textRow().endpos();
if (end == 0)
// empty text, end-1 is no valid position
return;
bool boundary = false;
if (!cur.paragraph().isLineSeparator(end-1) &&
!cur.paragraph().isNewline(end-1))