[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch sea
From: |
Matt Armstrong |
Subject: |
bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing |
Date: |
Wed, 19 Oct 2022 16:49:06 -0700 |
Matt Armstrong <matt@rfc20.org> writes:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>> Thanks, I have fixed this specific problem with the patch below.
>> Let's hope it also fixes your original issue with notmuch.
>>
>> Stefan
>>
>> diff --git a/src/textprop.c b/src/textprop.c
>> index 04fae528097..b34246f5bc7 100644
>> --- a/src/textprop.c
>> +++ b/src/textprop.c
>> @@ -649,7 +649,8 @@ get_char_property_and_overlay (Lisp_Object position,
>> register Lisp_Object prop,
>> Lisp_Object tem = Foverlay_get (node->data, prop);
>> struct sortvec *this;
>>
>> - if (NILP (tem) || (w && ! overlay_matches_window (w, node->data)))
>> + if (NILP (tem) || node->end < pos + 1
>> + || (w && ! overlay_matches_window (w, node->data)))
>> continue;
>>
>> this = (result == items ? items + 1 : items);
>
> Hmm...spoke too soon. Despite your fix Stefan
[...]
New repro, see function below. Symptoms: despite inserting two lines of
text, and there being a single overlay at (1,1) with the 'invisible
prop, all I see in the buffer is the ellipsis. I can cursor around and
see the position change in the mode line, but the display never changes.
With the cursor at EOB it appears after the ellipsis. Anywhere else and
the cursor appears before it.
(defun my-b58479-4 ()
(interactive)
(with-current-buffer (get-buffer-create "*b58479*")
(kill-all-local-variables)
(delete-all-overlays)
(setq buffer-read-only nil)
(setq buffer-file-name nil)
(setq buffer-undo-list nil)
(let ((inhibit-read-only t)
(inhibit-modification-hooks t))
(erase-buffer))
(add-to-invisibility-spec (cons 'ellipsis t))
(goto-char (point-max))
(insert "first line\nsecond line\n")
(let ((overlay (make-overlay 1 1)))
(overlay-put overlay 'invisible 'ellipsis))
(display-buffer (current-buffer))))
----------------------------------------------------------------------
position: 1 of 29 (0%), column: 0
character: f (displayed as f) (codepoint 102, #o146, #x66)
charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x66
script: latin
syntax: w which means: word
category: .:Base, L:Strong L2R, a:ASCII, l:Latin, r:Roman
to input: type "C-x 8 RET 66" or "C-x 8 RET LATIN SMALL LETTER F"
buffer code: #x66
file code: #x66 (encoded by coding system utf-8-unix)
display: by this font (glyph code):
ftcrhb:- -Go Mono-regular-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#x49)
Character code properties: customize what to show
name: LATIN SMALL LETTER F
general-category: Ll (Letter, Lowercase)
decomposition: (102) ('f')
There is an overlay here:
From 1 to 1
invisible ellipsis
----------------------------------------------------------------------
position: 29 of 29 (97%), column: 5
character: q (displayed as q) (codepoint 113, #o161, #x71)
charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x71
script: latin
syntax: w which means: word
category: .:Base, L:Strong L2R, a:ASCII, l:Latin, r:Roman
to input: type "C-x 8 RET 71" or "C-x 8 RET LATIN SMALL LETTER Q"
buffer code: #x71
file code: #x71 (encoded by coding system utf-8-unix)
display: by this font (glyph code):
ftcrhb:- -Go Mono-regular-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#x54)
Character code properties: customize what to show
name: LATIN SMALL LETTER Q
general-category: Ll (Letter, Lowercase)
decomposition: (113) ('q')
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, (continued)
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Ihor Radchenko, 2022/10/16
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Matt Armstrong, 2022/10/17
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Ihor Radchenko, 2022/10/17
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Matt Armstrong, 2022/10/17
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Stefan Monnier, 2022/10/17
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Stefan Monnier, 2022/10/18
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Ihor Radchenko, 2022/10/19
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Stefan Monnier, 2022/10/19
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Matt Armstrong, 2022/10/19
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Matt Armstrong, 2022/10/19
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing,
Matt Armstrong <=
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Stefan Monnier, 2022/10/20
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Matt Armstrong, 2022/10/20
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Stefan Monnier, 2022/10/20