From: Eli Zaretskii Date: Sat, 26 Apr 2025 14:20:01 +0000 (+0300) Subject: Avoid signaling errors in 'cursor-face-highlight-mode' X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eabfff2a0251dfa8095e3e32103e21a1cf3561cf;p=emacs.git Avoid signaling errors in 'cursor-face-highlight-mode' * lisp/simple.el (redisplay--update-cursor-face-highlight): Don't go beyond the accessible portion of the buffer. (Bug#77747) (cherry picked from commit f7aad714d2854e3f05d87298776628df1d5bfbb2) --- diff --git a/lisp/simple.el b/lisp/simple.el index e80301a5fdb..9388b7a1553 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -7071,7 +7071,7 @@ This variable is similar to `highlight-nonselected-windows'." (pt (window-point window)) (cursor-face (get-text-property pt 'cursor-face))) (let* ((start (previous-single-property-change - (1+ pt) 'cursor-face nil (point-min))) + (min (1+ pt) (point-max)) 'cursor-face nil (point-min))) (end (next-single-property-change pt 'cursor-face nil (point-max))) (new (redisplay--highlight-overlay-function