Fix 'mouse-drag-copy-region' = 'non-empty'

* lisp/mouse.el (mouse-save-then-kill): Fix conditions for copying
when 'mouse-drag-copy-region' is 'non-empty'.  (Bug#81366)
This commit is contained in:
Eli Zaretskii 2026-07-18 11:49:47 +03:00
parent f532313220
commit c6c8012d7a

View file

@ -2388,8 +2388,8 @@ if `mouse-drag-copy-region' is non-nil)."
(exchange-point-and-mark)
(mouse-set-region-1)
(when (and mouse-drag-copy-region
(or (not (eq mouse-drag-copy-region 'non-empty))
(not (/= (mark t) (point)))))
(not (and (eq mouse-drag-copy-region 'non-empty)
(= (mark t) (point)))))
(kill-new (filter-buffer-substring (mark t) (point))))
(setq mouse-save-then-kill-posn click-pt)))))