mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-05-04 12:21:46 -07:00
Make <mouse-3> in the mode line more careful
* lisp/mouse.el (mouse-delete-window): Only delete the window if the user hasn't moved point out of the mode line before releasing the button (bug#56198).
This commit is contained in:
parent
7fc3f1b0d1
commit
cd6ce7e546
1 changed files with 7 additions and 1 deletions
|
|
@ -655,7 +655,13 @@ This command must be bound to a mouse click."
|
|||
(interactive "e")
|
||||
(unless (one-window-p t)
|
||||
(mouse-minibuffer-check click)
|
||||
(delete-window (posn-window (event-start click)))))
|
||||
;; Only delete the window if the user hasn't moved point out of
|
||||
;; the mode line before releasing the button.
|
||||
(when (and (eq (posn-area (event-end click))
|
||||
'mode-line)
|
||||
(eq (posn-window (event-end click))
|
||||
(posn-window (event-start click))))
|
||||
(delete-window (posn-window (event-start click))))))
|
||||
|
||||
(defun mouse-select-window (click)
|
||||
"Select the window clicked on; don't move point."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue