I don't really know what I'm doing here, but this smells like old code
that's no longer necessary, and is actively bad. I can't find any
problem with my change.

The setCursor() call was terribly dubious.

regards
john

Index: text2.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v
retrieving revision 1.624
diff -u -a -p -r1.624 text2.C
--- text2.C     18 Jul 2005 20:34:55 -0000      1.624
+++ text2.C     21 Jul 2005 04:29:14 -0000
@@ -622,18 +622,11 @@ void LyXText::insertInset(LCursor & cur,
 // needed to insert the selection
 void LyXText::insertStringAsLines(LCursor & cur, string const & str)
 {
-       pit_type pit = cur.pit();
-       pos_type pos = cur.pos();
        recordUndo(cur);
 
-       // only to be sure, should not be neccessary
-       cur.clearSelection();
-       cur.buffer().insertStringAsLines(pars_, pit, pos, current_font, str,
-               autoBreakRows_);
-
+       cur.buffer().insertStringAsLines(pars_, cur.pit(), cur.pos(),
+                                        current_font, str, autoBreakRows_);
        cur.resetAnchor();
-       setCursor(cur, cur.pit(), pos);
-       cur.setSelection();
 }
 
 

Reply via email to