emacs-diffs
[Top][All Lists]
Advanced

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

master 5496f45437: Avoid signaling args-out-of-range in mouse.el


From: Eli Zaretskii
Subject: master 5496f45437: Avoid signaling args-out-of-range in mouse.el
Date: Wed, 23 Nov 2022 10:16:57 -0500 (EST)

branch: master
commit 5496f454372a2e4fec651423c41b5ee2a06e0add
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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)
---
 lisp/mouse.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/mouse.el b/lisp/mouse.el
index e38a4f8a71..f72ab4fc64 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



reply via email to

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