"Bo Peng" <[EMAIL PROTECTED]> writes:

> Did you test middle-button paste in trunk? It works perfect for me and
> if you find no other problem, please patch 1.5.x.

I propose to apply the following instead: I do the haveSelection call
in the calling dispatch. I suspect (did not test) that your patch
missed math, for example.

JMarc

Index: src/insets/InsetTabular.cpp
===================================================================
--- src/insets/InsetTabular.cpp	(révision 19281)
+++ src/insets/InsetTabular.cpp	(copie de travail)
@@ -3490,7 +3490,6 @@ void InsetTabular::doDispatch(Cursor & c
 		cell(cur.idx())->dispatch(cur, cmd);
 		break;
 	}
-	theSelection().haveSelection(bvcur.selection());
 }
 
 
Index: src/BufferView.cpp
===================================================================
--- src/BufferView.cpp	(révision 19281)
+++ src/BufferView.cpp	(copie de travail)
@@ -63,6 +63,7 @@
 #include "frontends/alert.h"
 #include "frontends/FileDialog.h"
 #include "frontends/FontMetrics.h"
+#include "frontends/Selection.h"
 
 #include "graphics/Previews.h"
 
@@ -1224,6 +1225,9 @@ bool BufferView::workAreaDispatch(FuncRe
 	if (!cur.result().dispatched())
 		cur.dispatch(cmd);
 
+	//Do we have a selection?
+	theSelection().haveSelection(cursor().selection());
+
 	// Redraw if requested and necessary.
 	if (cur.result().dispatched() && cur.result().update())
 		return update(cur.result().update());
Index: src/Text3.cpp
===================================================================
--- src/Text3.cpp	(révision 19281)
+++ src/Text3.cpp	(copie de travail)
@@ -1603,7 +1603,6 @@ void Text::dispatch(Cursor & cur, FuncRe
 	}
 
 	needsUpdate |= (cur.pos() != cur.lastpos()) && cur.selection();
-	theSelection().haveSelection(bv->cursor().selection());
 
 	// FIXME: The cursor flag is reset two lines below
 	// so we need to check here if some of the LFUN did touch that.

Reply via email to