On Sat, Feb 15, 2003 at 05:42:41PM +0000, John Levon wrote: > On Sat, Feb 15, 2003 at 06:59:48PM +0200, Dekel Tsur wrote: > > > Create a document with two paragraph, save it, quit LyX, and reopen the > > document. Now, go to the end of the 1st paragraph, and press delete: > > LyX doesn't merge the two paragraphs as it suppose to. > > This is weird: the first check in LyXText::Delete is failing now.
Actually this bug is very old. 2629 // CHECK Look at the comment here. 2630 // This check is not very good... 2631 // The cursorRightIntern calls DeleteEmptyParagrapgMechanism 2632 // and that can very well delete the par or par->previous in 2633 // old_cursor. Will a solution where we compare paragraph id's 2634 //work better? 2635 if ((cursor.par()->previous() ? cursor.par()->previous()->id() : 0) 2636 == old_cur_par_prev_id 2637 && cursor.par()->id() != old_cur_par_id) { 2638 // delete-empty-paragraph-mechanism has done it 2639 return; 2640 } No kidding not very good ! I can't quite figure out what this check is supposed to be, but the bug is obvious: 0 is a perfectly valid paragraph number. I'll test if "-1" makes things work better. john