Jean-Marc Lasgouttes wrote: > 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?
Isn't that semantically the same as: @@ -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.textRow().endpos() != cur.lastpos()&& !cur.paragraph().isLineSeparator(cur.pos()) && !cur.paragraph().isNewline(cur.pos())) Is that what you mean? Is it clearer? -- Angus