>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
Angus> why not + cur.lastpos() != (cur.pos() + 1) && ? Oops. I am not even sure that the test meant what I thought it meant. What about the following? JMarc
Index: src/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2277 diff -u -p -r1.2277 ChangeLog --- src/ChangeLog 10 Sep 2005 13:29:43 -0000 1.2277 +++ src/ChangeLog 13 Sep 2005 14:56:01 -0000 @@ -1,3 +1,8 @@ +2005-09-13 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * text2.C (cursorEnd, cursorRight): do not set boundary to true at + end of paragraph. (bug 2010) + 2005-09-10 Georg Baum <[EMAIL PROTECTED]> * text.C (leftMargin): check for inInset == 0 Index: src/text2.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v retrieving revision 1.627 diff -u -p -r1.627 text2.C --- src/text2.C 5 Sep 2005 06:50:42 -0000 1.627 +++ src/text2.C 13 Sep 2005 14:56:01 -0000 @@ -498,12 +498,13 @@ void LyXText::cursorEnd(LCursor & cur) // empty text, end-1 is no valid position return; bool boundary = false; - if (!cur.paragraph().isLineSeparator(end-1) && - !cur.paragraph().isNewline(end-1)) - { - boundary = true; - } else if (end != cur.lastpos()) - --end; + if (end != cur.lastpos()) { + if (!cur.paragraph().isLineSeparator(end-1) + && !cur.paragraph().isNewline(end-1)) + boundary = true; + else + --end; + } setCursor(cur, cur.pit(), end, true, boundary); } @@ -1020,7 +1021,8 @@ bool LyXText::cursorRight(LCursor & cur) if (cur.pos() != cur.lastpos()) { bool updateNeeded = false; if (!checkAndActivateInset(cur, true)) { - if (cur.textRow().endpos() == (cur.pos() + 1) && + if (cur.textRow().endpos() == cur.pos() + 1 && + cur.lastpos() != cur.pos() + 1 && !cur.paragraph().isLineSeparator(cur.pos()) && !cur.paragraph().isNewline(cur.pos())) {