GNU bug report logs -
#79275
30.2.50; overlay line-prefix display property fighting with text display property
Previous Next
Full log
Message #11 received at 79275 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: JD Smith <jdtsmith <at> gmail.com>
>> Date: Tue, 19 Aug 2025 21:39:38 -0400
>>
>> An overlay which applies a line-prefix (e.g. to set the fringe) across several lines conflicts with underlying text which has a replacing display property set. Evaluate the following in the *scratch* buffer, with at least 3 blank lines at the top of the buffer.
>>
>> (progn
>> (delete-all-overlays)
>> (let ((ov (make-overlay 1 4)))
>> (overlay-put ov 'line-prefix (propertize "SHOULDNOTSEETHIS" 'display
>> '(left-fringe right-triangle success))))
>> (put-text-property 2 3 'display ">testing fringe display"))
>>
>> The result is very strange: the SHOULDNOTSEETHIS prefix string appears (sans fringe display), but then vanishes on the next redisplay. Some (well-balanced) fight between overlay line-prefix display and normal display properties seems to be occurring.
>
> Thanks.
>
> One of the redisplay optimizations we use couldn't cope with this
> tricky situation (a line-prefix immediately followed by a display
> string at the beginning of a line), and needs to be disabled in this
> case.
>
> Does the patch below give good results?
Yes it does, thanks. There still appears to be another corner case,
however. If the conflict occurs at the /beginning/ of the overlay:
(progn
(delete-all-overlays)
(let ((ov (make-overlay 1 4)))
(overlay-put ov 'line-prefix (propertize "SHOULDNOTSEETHIS" 'display
'(left-fringe right-triangle success))))
(put-text-property 1 2 'display ">testing fringe display")) ;; changed from 2->3 to 1->2
SHOULDNOTSEETHIS still appears (and remains). That situation is what
actually motivated the report.
This bug report was last modified 20 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.