]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid signaling errors in 'cursor-face-highlight-mode'
authorEli Zaretskii <eliz@gnu.org>
Sat, 26 Apr 2025 14:20:01 +0000 (17:20 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 27 Apr 2025 13:28:47 +0000 (15:28 +0200)
* 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)

lisp/simple.el

index e80301a5fdb67183f4b6123eac1cdafa47fe0e03..9388b7a1553052fd30966c15ee7c44da821c0adb 100644 (file)
@@ -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