On Sun, Mar 16, 2003 at 01:37:23PM +0100, Alfredo Braunstein wrote: > The isNewline() call on line 2611 of LyXText::backspace on text.C is > responsible of a getChar() on a bogus pos when backspacing the last char on > a paragraph (we have already called erase on this pos).
OK we need to fix that :) > This code (the while going from 2610 to 2621) is supposed to get sure to not > have a linebreak at the start of a paragraph. (there is code for this > purpose also on other places). Why? > 2609 // delete newlines at the beginning of paragraphs > 2610 while (!cursor.par()->empty() && > 2611 cursor.par()->isNewline(cursor.pos()) && > 2612 cursor.pos() == cursor.par()->beginningOfBody()) { You're mis-reading the code. What it's actually doing is removing any newlines *at the start of the main body*. Now, in a normal paragraph, that's not really needed (beginningOfBody() == 0 then). But when we have a manual label (e.g. in a list), allowing a newline at the very start of the body (which starts after the first space) causes LaTeX errors, since it's not allowed. So we have to prevent the user doing it. regards, john