[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40821: Margin strings are displayed in reverse order of overlay prio
From: |
Clément Pit-Claudel |
Subject: |
bug#40821: Margin strings are displayed in reverse order of overlay priority (low-priority specs hide high-priority ones) |
Date: |
Wed, 13 May 2020 11:58:26 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 25/04/2020 03.58, Eli Zaretskii wrote:
> The strings are not concatenated, they are displayed one after
> another, in the order they are processed by the display engine.
I wonder if this should be its separate issue, but the order of strings in the
margins changes as the point moves around in the buffer:
(with-current-buffer (get-buffer-create "overlay props")
(erase-buffer)
(delete-all-overlays)
(setq-local left-margin-width 5)
(save-excursion (insert "test\ntest\n"))
(let ((ov1 (make-overlay (point-min) (point-max)))
(ov2 (make-overlay (point-min) (point-at-eol))))
(overlay-put
ov1
'before-string
#("!" 0 1 (display
((margin left-margin) "c"))))
(overlay-put
ov2
'before-string
#("!" 0 1 (display
((margin left-margin) "3")))))
(display-buffer (current-buffer)))
In this example, moving the point back and forth between point-min and 1+
point-min causes the margins to display alternatively "c3" and "3c".
Is this a bug?
- bug#40821: Margin strings are displayed in reverse order of overlay priority (low-priority specs hide high-priority ones),
Clément Pit-Claudel <=