On Mon, Oct 27, 2003 at 08:54:16PM +0100, Alfredo Braunstein wrote: > Ok to apply?
Hm maybe we should think about the 'two physical positions' between the end of some row and the beginning of the next one again... > Index: text2.C > =================================================================== > RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v > retrieving revision 1.487 > diff -u -p -u -r1.487 text2.C > --- text2.C 27 Oct 2003 12:41:23 -0000 1.487 > +++ text2.C 27 Oct 2003 19:52:12 -0000 > @@ -570,7 +570,12 @@ void LyXText::cursorHome() > void LyXText::cursorEnd() > { > ParagraphList::iterator cpit = cursorPar(); > - setCursor(cpit, cpit->getRow(cursor.pos())->endpos() - 1); > + RowList::iterator rit = cpit->getRow(cursor.pos()); > + > + if (rit->endpos() == cpit->size()) > + setCursor(cpit, rit->endpos()); > + else > + setCursor(cpit, rit->endpos() - 1); > } Note that I'd like to add some more convoluted logic there: If the cursor is already at the end of some line, it should go to the end of a paragraph. If it is there, it should go to the end of the text insets. If it is there it should leave the text inset. [Just press repeatedly <End> in a math table and an ordinary table to see what I mean. It's a nice feature without much cost.] Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)