Commit f42be8fd authored by Richard M. Stallman's avatar Richard M. Stallman

(mouse-drag-region): Set the region before reading a

character, so the selection exists while we wait.
parent fb859603
......@@ -575,13 +575,13 @@ remains active. Otherwise, it remains until the next input event."
(if (not (= (overlay-start mouse-drag-overlay)
(overlay-end mouse-drag-overlay)))
(let (last-command this-command)
(push-mark (overlay-start mouse-drag-overlay) t t)
(goto-char (overlay-end mouse-drag-overlay))
(copy-region-as-kill (point) (mark t))
(let ((inhibit-quit t))
(setq unread-command-events
(cons (read-event) unread-command-events))
(setq quit-flag nil))
(push-mark (overlay-start mouse-drag-overlay) t t)
(goto-char (overlay-end mouse-drag-overlay))
(copy-region-as-kill (point) (mark t))
(mouse-set-region-1)
(delete-overlay mouse-drag-overlay))
(goto-char (overlay-end mouse-drag-overlay))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment