On 19-Sep-2001 Jean-Marc Lasgouttes wrote:

> This happens when the cursor is between two spaces. If you do a
> setCursor from there, the extra space is deleted, the row is deleted
> and reallocated, so that the cursor that you have saved as
> selection.cursor earlier is lost.

Ok! Why then not doing the following:

diff -u -p -r1.167 text2.C
--- text2.C     2001/09/12 10:41:24     1.167
+++ text2.C     2001/09/20 07:15:29
@@ -1851,6 +1851,8 @@ void LyXText::pasteSelection(BufferView 
    
        selection.cursor = cursor;
        setCursor(bview, actpar, pos);
+       setCursor(bview, selection.cursor, selection.cursor.par(),
+                 selection.cursor.pos());
        setSelection(bview);
        updateCounters(bview, cursor.row());
 }

> This stuff (the deleteEmptyParagraphMechanism) is really ugly, and the
> cause for many of the crashes LyX can produce

IMO the savest thing to do is reset ALL cursor par/pos we use in LyXText
when we delete a row-pointer. Deletion of row-pointers is done in 1 or
max 2 points so this shouldn't behave too bad!

> (OK, we have some new ones now with new insets :).

:) well but most of them are also a problem of this deleted row and 
   unvalid cursor stuff, the others are Undo releated.

        Jürgen

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen Vigna        E-Mail:  [EMAIL PROTECTED]
Italienallee 13/N       Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen           Web:     http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

You are fighting for survival in your own sweet and gentle way.

Reply via email to