summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 8e9d931c15c..94d19d99a21 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1521,7 +1521,11 @@ This must be bound to a mouse drag event."
(with-current-buffer (window-buffer (posn-window posn))
(if (numberp (posn-point posn))
(setq beg (posn-point posn)))
- (move-overlay mouse-secondary-overlay beg (posn-point end)))))
+ (move-overlay mouse-secondary-overlay beg (posn-point end))
+ (x-set-selection
+ 'SECONDARY
+ (buffer-substring (overlay-start mouse-secondary-overlay)
+ (overlay-end mouse-secondary-overlay))))))
(defun mouse-drag-secondary (start-event)
"Set the secondary selection to the text that the mouse is dragged over.