bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51557: 27.2; `mouse-1' with `cua-rectangle-mark-mode'


From: Lars Ingebrigtsen
Subject: bug#51557: 27.2; `mouse-1' with `cua-rectangle-mark-mode'
Date: Thu, 04 Nov 2021 19:35:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> M-x cua-rectangle-mark-mode ; (after selecting a region or not)
>
> Click `mouse-1' somewhere.  No effect, it seems.  The mode remains in
> effect (same key help is displayed).
>
> Click `mouse-1' again (anywhere).  It seems that that exits
> `cua-rectangle-mode'.

It seems like the intention is to re-start the rectangle on mouse-1?  I
don't use the mode either, but that does seem to make sense to me.

(defun cua-mouse-set-rectangle-mark (event)
  "Start rectangle at mouse click position."
  (interactive "e")
  (when cua--rectangle
    (cua--deactivate-rectangle)
    (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))

And I guess the "FIX ME" is part of the problem here.  Anybody else got
any insights here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]