Alfredo Braunstein wrote:

> Ok to apply?

Cuter variant.

Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.1657
diff -u -p -r1.1657 ChangeLog
--- ChangeLog   27 Oct 2003 20:23:25 -0000      1.1657
+++ ChangeLog   28 Oct 2003 07:20:49 -0000
@@ -1,3 +1,8 @@
+2003-10-28  Alfredo Braunstein  <[EMAIL PROTECTED]>
+
+       * text2.C (cursorEnd): simple fix to the "end key goes to one
+       before the end on last row" bug
+
 2003-10-27  Alfredo Braunstein  <[EMAIL PROTECTED]>
 
        * text.C (backspace): fix the "zombie characters"
Index: text2.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v
retrieving revision 1.487
diff -u -p -r1.487 text2.C
--- text2.C     27 Oct 2003 12:41:23 -0000      1.487
+++ text2.C     28 Oct 2003 07:20:52 -0000
@@ -570,7 +570,8 @@ void LyXText::cursorHome()
 void LyXText::cursorEnd()
 {
        ParagraphList::iterator cpit = cursorPar();
-       setCursor(cpit, cpit->getRow(cursor.pos())->endpos() - 1);
+       pos_type end = cpit->getRow(cursor.pos())->endpos();
+       setCursor(cpit, end == cpit->size() ? end : end - 1);
 }
 
 

Reply via email to