bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#77747: 'cursor-face-highlight-mode' signals 'args-out-of-range' in n


From: Eli Zaretskii
Subject: bug#77747: 'cursor-face-highlight-mode' signals 'args-out-of-range' in narrowed buffer
Date: Sun, 13 Apr 2025 12:52:51 +0300

> From: Ship Mints <shipmints@gmail.com>
> Date: Fri, 11 Apr 2025 11:32:18 -0400
> 
> -Q reproducer
> 
> ;; The culprit appears to be `redisplay--update-cursor-face-highlight'
> (setq debug-on-error t)
> (cursor-face-highlight-mode)
> (save-excursion (insert (propertize "cursor face text\n"
>                                     'cursor-face 'region)))
> (narrow-to-region (pos-bol) (pos-eol))
> (setq unread-command-events (mapcar #'identity
>                                     (kbd "C-n")))

Thanks, does the below fix it?

diff --git a/lisp/simple.el b/lisp/simple.el
index ee09a6f..9e9dd15 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -7265,7 +7265,7 @@ redisplay--update-cursor-face-highlight
               (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-min)) 'cursor-face nil (point-min)))
                (end (next-single-property-change
                      pt 'cursor-face nil (point-max)))
                (new (redisplay--highlight-overlay-function





reply via email to

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