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)
This commit is contained in:
Eli Zaretskii 2022-11-23 17:16:32 +02:00
parent 43e616aca5
commit 5496f45437

View file

@ -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