GNU bug report logs -
#77747
'cursor-face-highlight-mode' signals 'args-out-of-range' in narrowed buffer
Previous Next
Reported by: Ship Mints <shipmints <at> gmail.com>
Date: Fri, 11 Apr 2025 15:33:02 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 77747 in the body.
You can then email your comments to 77747 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77747
; Package
emacs
.
(Fri, 11 Apr 2025 15:33:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ship Mints <shipmints <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 11 Apr 2025 15:33:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
-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")))
-Stephane
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77747
; Package
emacs
.
(Sun, 13 Apr 2025 09:54:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 77747 <at> debbugs.gnu.org (full text, mbox):
> From: Ship Mints <shipmints <at> 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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77747
; Package
emacs
.
(Sun, 13 Apr 2025 11:30:09 GMT)
Full text and
rfc822 format available.
Message #11 received at 77747 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Apr 13, 2025 at 5:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Ship Mints <shipmints <at> 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
>
Not quite. That winds up coalescing the highlight across lines rather than
just the line with the cursor.
This works better but I'm not sure if this is in the true spirit of the
intended use as the property change may not be floored to bol?
diff --git a/lisp/simple.el b/lisp/simple.el
index 7037158df8d..9ebe9a0ba34 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -7259,7 +7259,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) (pos-bol)) 'cursor-face nil
(point-min)))
(end (next-single-property-change
pt 'cursor-face nil (point-max)))
(new (redisplay--highlight-overlay-function
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77747
; Package
emacs
.
(Sun, 13 Apr 2025 11:39:06 GMT)
Full text and
rfc822 format available.
Message #14 received at 77747 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Apr 13, 2025 at 7:28 AM Ship Mints <shipmints <at> gmail.com> wrote:
> On Sun, Apr 13, 2025 at 5:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> > From: Ship Mints <shipmints <at> 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
>>
>
> Not quite. That winds up coalescing the highlight across lines rather
> than just the line with the cursor.
>
> This works better but I'm not sure if this is in the true spirit of the
> intended use as the property change may not be floored to bol?
>
> diff --git a/lisp/simple.el b/lisp/simple.el
> index 7037158df8d..9ebe9a0ba34 100644
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -7259,7 +7259,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) (pos-bol)) 'cursor-face nil
> (point-min)))
> (end (next-single-property-change
> pt 'cursor-face nil (point-max)))
> (new (redisplay--highlight-overlay-function
>
I tested my experiment above in my own reproducer and it doesn't work
there, though it worked in a larger case with a lot more text, I didn't
look further.
Your recommendation doesn't work in the reproducer and it signals as before.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77747
; Package
emacs
.
(Sun, 13 Apr 2025 11:56:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 77747 <at> debbugs.gnu.org (full text, mbox):
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Sun, 13 Apr 2025 07:28:43 -0400
> Cc: 77747 <at> debbugs.gnu.org
>
> On Sun, Apr 13, 2025 at 5:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Ship Mints <shipmints <at> 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
>
> Not quite. That winds up coalescing the highlight across lines rather than just the line with the cursor.
>
> This works better but I'm not sure if this is in the true spirit of the intended use as the property change may
> not be floored to bol?
I guess it's up to the author (CC'ed), then.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77747
; Package
emacs
.
(Sun, 13 Apr 2025 11:57:04 GMT)
Full text and
rfc822 format available.
Message #20 received at 77747 <at> debbugs.gnu.org (full text, mbox):
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Sun, 13 Apr 2025 07:38:34 -0400
> Cc: 77747 <at> debbugs.gnu.org
>
> Your recommendation doesn't work in the reproducer and it signals as before.
<Shrug> Granted, it did work for me.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77747
; Package
emacs
.
(Sun, 13 Apr 2025 12:15:03 GMT)
Full text and
rfc822 format available.
Message #23 received at 77747 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Apr 13, 2025 at 7:56 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Sun, 13 Apr 2025 07:38:34 -0400
> > Cc: 77747 <at> debbugs.gnu.org
> >
> > Your recommendation doesn't work in the reproducer and it signals as
> before.
>
> <Shrug> Granted, it did work for me.
>
<Shrug> here, too. It seems my changes to simple.el weren't
properly picked up. I recompiled and it does indeed work in both the
reproducer and in a larger context.
Thank you for taking your time with this. I'll run with this locally.
-Stephane
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77747
; Package
emacs
.
(Fri, 25 Apr 2025 13:52:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 77747 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Apr 13, 2025 at 5:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Ship Mints <shipmints <at> 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
>
Eli, possible to apply the above soon?
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77747
; Package
emacs
.
(Fri, 25 Apr 2025 15:00:03 GMT)
Full text and
rfc822 format available.
Message #29 received at 77747 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Apr 25, 2025 at 9:51 AM Ship Mints <shipmints <at> gmail.com> wrote:
> On Sun, Apr 13, 2025 at 5:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> > From: Ship Mints <shipmints <at> 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
>>
>
> Eli, possible to apply the above soon?
>
Actually, I'm back to thinking this is better or the effect is that the
whole buffer can wind up being unexpectedly highlighted:
(min (1+ pt) (pos-bol)) 'cursor-face nil
(point-min)))
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77747
; Package
emacs
.
(Fri, 25 Apr 2025 16:22:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 77747 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Apr 25, 2025 at 10:58 AM Ship Mints <shipmints <at> gmail.com> wrote:
> On Fri, Apr 25, 2025 at 9:51 AM Ship Mints <shipmints <at> gmail.com> wrote:
>
>> On Sun, Apr 13, 2025 at 5:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>>> > From: Ship Mints <shipmints <at> 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
>>>
>>
>> Eli, possible to apply the above soon?
>>
>
> Actually, I'm back to thinking this is better or the effect is that the
> whole buffer can wind up being unexpectedly highlighted:
>
> (min (1+ pt) (pos-bol)) 'cursor-face nil
> (point-min)))
>
To be clearer:
The original condition (1+ pt) 'cursor-face nil (point-min))) works fine in
a wide buffer.
The condition (min (1+ pt) (point-min)) 'cursor-face nil (point-min))) in a
wide buffer winds up highlighting all the way to point-min in a buffer
where every line has 'cursor-face which is undesirable.
I've experimented and tried to have 'cursor-face span only bol to eol-2 and
that is confirmed visually, yet the entire buffer before the current line
is highlighted in the cursor face.
mouse-face highlighting on the same lines (the text properties are applied
all together) works properly whether the buffer is narrowed or wide.
I suppose it's technically doing the correct thing if every single line in
a buffer has a cursor-face property? How does one differentiate one line
from another, if so, and why does mouse-face work differently?
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77747
; Package
emacs
.
(Fri, 25 Apr 2025 18:38:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 77747 <at> debbugs.gnu.org (full text, mbox):
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Fri, 25 Apr 2025 12:21:40 -0400
> Cc: 77747 <at> debbugs.gnu.org
>
> On Fri, Apr 25, 2025 at 10:58 AM Ship Mints <shipmints <at> gmail.com> wrote:
>
> On Fri, Apr 25, 2025 at 9:51 AM Ship Mints <shipmints <at> gmail.com> wrote:
>
> On Sun, Apr 13, 2025 at 5:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Ship Mints <shipmints <at> 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
>
> Eli, possible to apply the above soon?
>
> Actually, I'm back to thinking this is better or the effect is that the whole buffer can wind up being
> unexpectedly highlighted:
>
> (min (1+ pt) (pos-bol)) 'cursor-face nil (point-min)))
>
> To be clearer:
>
> The original condition (1+ pt) 'cursor-face nil (point-min))) works fine in a wide buffer.
>
> The condition (min (1+ pt) (point-min)) 'cursor-face nil (point-min))) in a wide buffer winds up highlighting all
> the way to point-min in a buffer where every line has 'cursor-face which is undesirable.
It should obviously be point-max, not point-min.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77747
; Package
emacs
.
(Fri, 25 Apr 2025 19:25:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 77747 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Apr 25, 2025 at 2:37 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Fri, 25 Apr 2025 12:21:40 -0400
> > Cc: 77747 <at> debbugs.gnu.org
> >
> > On Fri, Apr 25, 2025 at 10:58 AM Ship Mints <shipmints <at> gmail.com> wrote:
> >
> > On Fri, Apr 25, 2025 at 9:51 AM Ship Mints <shipmints <at> gmail.com> wrote:
> >
> > On Sun, Apr 13, 2025 at 5:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > > From: Ship Mints <shipmints <at> 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
> >
> > Eli, possible to apply the above soon?
> >
> > Actually, I'm back to thinking this is better or the effect is that the
> whole buffer can wind up being
> > unexpectedly highlighted:
> >
> > (min (1+ pt) (pos-bol)) 'cursor-face nil
> (point-min)))
> >
> > To be clearer:
> >
> > The original condition (1+ pt) 'cursor-face nil (point-min))) works fine
> in a wide buffer.
> >
> > The condition (min (1+ pt) (point-min)) 'cursor-face nil (point-min)))
> in a wide buffer winds up highlighting all
> > the way to point-min in a buffer where every line has 'cursor-face which
> is undesirable.
>
> It should obviously be point-max, not point-min.
>
Yeah. Of course. Feel free to apply AFAIC.
[Message part 2 (text/html, inline)]
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 26 Apr 2025 14:22:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ship Mints <shipmints <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 26 Apr 2025 14:22:03 GMT)
Full text and
rfc822 format available.
Message #43 received at 77747-done <at> debbugs.gnu.org (full text, mbox):
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Fri, 25 Apr 2025 15:24:02 -0400
> Cc: 77747 <at> debbugs.gnu.org
>
> On Fri, Apr 25, 2025 at 2:37 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Fri, 25 Apr 2025 12:21:40 -0400
> > Cc: 77747 <at> debbugs.gnu.org
> >
> > On Fri, Apr 25, 2025 at 10:58 AM Ship Mints <shipmints <at> gmail.com> wrote:
> >
> > On Fri, Apr 25, 2025 at 9:51 AM Ship Mints <shipmints <at> gmail.com> wrote:
> >
> > On Sun, Apr 13, 2025 at 5:52 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > > From: Ship Mints <shipmints <at> 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
> >
> > Eli, possible to apply the above soon?
> >
> > Actually, I'm back to thinking this is better or the effect is that the whole buffer can wind up being
> > unexpectedly highlighted:
> >
> > (min (1+ pt) (pos-bol)) 'cursor-face nil (point-min)))
> >
> > To be clearer:
> >
> > The original condition (1+ pt) 'cursor-face nil (point-min))) works fine in a wide buffer.
> >
> > The condition (min (1+ pt) (point-min)) 'cursor-face nil (point-min))) in a wide buffer winds up
> highlighting all
> > the way to point-min in a buffer where every line has 'cursor-face which is undesirable.
>
> It should obviously be point-max, not point-min.
>
> Yeah. Of course. Feel free to apply AFAIC.
Done.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 25 May 2025 11:24:19 GMT)
Full text and
rfc822 format available.
This bug report was last modified 38 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.