Hi Kornel,

Kornel Benko wrote:

> I have one more. While searching for undo I found, that
> deleting Title in this file crashes lyx too.
> 
> 1.) Open file
> 2.) Move cursor to title-start
> 3.) delete title
> 4.) move cursor -> crash

I'm bored today ;-). 

Regards, Alfredo

Btw, excellent reports.


Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.1687
diff -u -p -u -r1.1687 ChangeLog
--- ChangeLog   5 Nov 2003 15:29:48 -0000       1.1687
+++ ChangeLog   5 Nov 2003 21:24:06 -0000
@@ -1,3 +1,7 @@
+2003-11-05  Alfredo Braunstein  <[EMAIL PROTECTED]>
+
+       * text2.C (deleteEmptyParagraphMechanism): fix n-th crash
+
 2003-11-05  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
        * output_linuxdoc.h: 
Index: text2.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v
retrieving revision 1.492
diff -u -p -u -r1.492 text2.C
--- text2.C     4 Nov 2003 12:36:53 -0000       1.492
+++ text2.C     5 Nov 2003 21:24:08 -0000
@@ -1819,12 +1819,14 @@ bool LyXText::deleteEmptyParagraphMechan
                recUndo(parOffset(old_pit), parOffset(endpit) - 1);
                cursor = tmpcursor;
 
+               // cache cursor pit
+               ParagraphList::iterator tmppit = cursorPar();
                // delete old par
                ownerParagraphs().erase(old_pit);
-               redoParagraph();
+               // update cursor par offset
+               cursor.par(tmppit);
 
-               // correct cursor y
-               setCursorIntern(cursor.par(), cursor.pos());
+               redoParagraph();
 
                if (selection_position_was_oldcursor_position) {
                        // correct selection

Reply via email to