From: Lars Ingebrigtsen Date: Sat, 4 Dec 2021 03:06:27 +0000 (+0100) Subject: Make `mouse-1' restart the cua-rect rectangle X-Git-Tag: emacs-29.0.90~3619^2~8 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b060c3844fb8ad5a134d160a844c5bf898024d15;p=emacs.git 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). --- diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index 65ae2f192fa..7df45e705d3 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -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.