>>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
Martin> The attached fixes the bug, and I didn't see any side effects. I think it is not the right fix :) Martin> Anyone remember what this code was supposed to do? the boundary code is what tells whether you are at the right of previous character or at the lest of the next one. This was introduced for RtL support, but Juergen V. has extended it to allow positioning the cursor either at end of row or beginning of next row before a displayed inset (eg maths). This was an old bug, which number I do not remember. I would think the real culprit is the code that sets boundary unconditionally to true when inserting a character (at the end of LyXText::insertChar): //setCursor(cur, cur.pit(), cur.pos() + 1, false, cur.boundary()); setCursor(cur, cur.pit(), cur.pos() + 1, false, true); The commented out version is the original code, the second one was added by Juergen V. It is with this line that you should experiment. I guess the question is what happens when you insert something just before a displayed math inset. JMarc