Andre Poenitz <[EMAIL PROTECTED]> writes:
| 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);
>> }
Add a comment why this is done. (I should have done that when I
changed this code in the first place.)
| 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.
Yes, but row-wise there are no horisontal movement.
| [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.]
Perhaps, off-hand I do not like it. It seems a bit like a muddled ui.
It might work, but initially I know I'd be surprised.
I'd rather have LFUN_PARAGRAPH_END (and we already have variants of
that.)
--
Lgb