Make `mouse-1' restart the cua-rect rectangle

* lisp/emulation/cua-rect.el (cua-mouse-set-rectangle-mark):
Restart the rectangle on mouse-1 (bug#51557).
This commit is contained in:
Lars Ingebrigtsen 2021-12-04 04:06:27 +01:00
parent be1359884f
commit b060c3844f

View file

@ -486,10 +486,8 @@ Activates the region if needed. Only lasts until the region is deactivated."
(cua--deactivate t))
(setq cua--last-rectangle nil)
(mouse-set-point event)
;; FIX ME -- need to calculate virtual column.
(cua-set-rectangle-mark)
(setq cua--buffer-and-point-before-command nil)
(setq cua--mouse-last-pos nil))
(activate-mark)
(cua-rectangle-mark-mode))
(defun cua-mouse-save-then-kill-rectangle (event arg)
"Expand rectangle to mouse click position and copy rectangle.