John Levon wrote:
> it's wrong.

well then here's a patch. It also sets bool realcut to false (i.e. do not 
touch the clipboard) for LFUN_DELETE. This is a bug Jean-Marc mentioned 
recently.

I have found two other instances in insettext.C and formulabase.C (see second 
patch). Please check if that is correct.

Jürgen.
Index: src/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/ChangeLog,v
retrieving revision 1.1359
diff -u -r1.1359 ChangeLog
--- src/ChangeLog	2003/06/02 14:19:29	1.1359
+++ src/ChangeLog	2003/06/02 19:45:35
@@ -1,3 +1,7 @@
+2003-06-02  Juergen Spitzmueller  <[EMAIL PROTECTED]>
+
+	* text3.C: fix cutSelection call, don't use clipboard on delete.
+
 2003-06-02  John Levon  <[EMAIL PROTECTED]>

 	* LyXAction.C:
Index: src/text3.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/text3.C,v
retrieving revision 1.79
diff -u -r1.79 text3.C
--- src/text3.C	2003/06/02 14:19:29	1.79
+++ src/text3.C	2003/06/02 19:45:37
@@ -736,7 +736,7 @@
 			// just comment out the line below...
 		} else {
 			update();
-			cutSelection(bv, true);
+			cutSelection(true, false);
 			update();
 		}
 		moveCursorUpdate(bv, false);
@@ -777,7 +777,7 @@
 			}
 		} else {
 			update();
-			cutSelection(bv, true);
+			cutSelection(true);
 		}
 		update();
 		break;
@@ -794,7 +794,7 @@
 			}
 		} else {
 			update();
-			cutSelection(bv, true);
+			cutSelection(true);
 			update();
 		}
 		bv->owner()->view_state_changed();
@@ -823,7 +823,7 @@
 			}
 		} else {
 			update();
-			cutSelection(bv, true);
+			cutSelection(true);
 		}
 		update();
 		break;
@@ -1034,7 +1034,7 @@
 
 	case LFUN_CUT:
 		update();
-		cutSelection(bv, true);
+		cutSelection(true);
 		update();
 		cmd.message(_("Cut"));
 		break;
Index: src/insets/insettext.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/insets/insettext.C,v
retrieving revision 1.404
diff -u -r1.404 insettext.C
--- src/insets/insettext.C	2003/06/02 10:03:23	1.404
+++ src/insets/insettext.C	2003/06/02 19:45:45
@@ -1214,7 +1214,7 @@
 	}

 	case LFUN_CUT: {
-		lt->cutSelection(bv);
+		lt->cutSelection();
 		updwhat = CURSOR_PAR;
 		updflag = true;
 		break;
Index: src/mathed/formulabase.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/mathed/formulabase.C,v
retrieving revision 1.266
diff -u -r1.266 formulabase.C
--- src/mathed/formulabase.C	2003/06/02 10:03:24	1.266
+++ src/mathed/formulabase.C	2003/06/02 19:45:46
@@ -920,7 +920,7 @@
 			f = new InsetFormula(sel);
 		else
 			f = new InsetFormulaMacro(sel);
-		bv->getLyXText()->cutSelection(bv);
+		bv->getLyXText()->cutSelection();
 		openNewInset(bv, f);
 	}
 	cmd.message(N_("Math editor mode"));

Reply via email to