summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-11-23 17:16:32 +0200
committerEli Zaretskii <eliz@gnu.org>2022-11-23 17:16:32 +0200
commit5496f454372a2e4fec651423c41b5ee2a06e0add (patch)
tree8eeac045df9762ef7f67cfc7a78a6241e2ed18e0 /lisp/mouse.el
parent43e616aca56daa438e47051e15f8d2a7454a5cb1 (diff)
downloademacs-5496f454372a2e4fec651423c41b5ee2a06e0add.tar.gz
Avoid signaling args-out-of-range in mouse.el
* lisp/mouse.el (mouse-posn-property): Avoid signaling args-out-of-range errors when mode-line format uses min-width 'display' property. (Bug#59452)
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index e38a4f8a71a..f72ab4fc642 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1579,6 +1579,7 @@ its value is returned."
;; `category' property at PT while doing the (get-char-property
;; pt property w)!
(or (and str
+ (< (cdr str) (length (car str)))
(get-text-property (cdr str) property (car str)))
;; Mouse clicks in the fringe come with a position in
;; (nth 5). This is useful but is not exactly where we clicked, so