This is a tentative (and perhaps naive) patch for bug 345. Regards,
Marco Morandini
Index: src/mathed/math_cursor.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/mathed/math_cursor.C,v retrieving revision 1.257 diff -u -r1.257 math_cursor.C --- src/mathed/math_cursor.C 2002/04/22 16:31:14 1.257 +++ src/mathed/math_cursor.C 2002/05/06 10:16:45 @@ -16,6 +16,7 @@ */ #include <config.h> +#include <lyxrc.h> #ifdef __GNUG__ #pragma implementation @@ -653,7 +654,7 @@ dump("selCopy"); if (selection_) { theSelection.grab(*this); - selClear(); + //selClear(); } } @@ -686,6 +687,10 @@ void MathCursor::selPaste() { dump("selPaste"); + if (lyxrc.auto_region_delete) + selDel(); + else + selClear(); theSelection.paste(*this); //theSelection.grab(*this); //selClear();