GNU bug report logs -
#65896
30.0.50; folding text with text properties prevents background from extending past the newline
Previous Next
Reported by: StrawberryTea <look <at> strawberrytea.xyz>
Date: Tue, 12 Sep 2023 18:02:01 UTC
Severity: wishlist
Found in version 30.0.50
Done: Ihor Radchenko <yantar92 <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
I finally figured it out. This can be resolved with a small Elisp advice:
(advice-add #’org-fold-core-region :around #’cae-org-fold-region-a)
(defun cae-org-fold-region-a (oldfun from to flag &optional spec-or-alias)
(if (and (eq to (point-max)) flag)
(setq to (1- to)))
(funcall oldfun from to flag spec-or-alias)
(remove-overlays from (1+ to) ’cae-org-fold-heading t)
(when flag
(let ((o (make-overlay to (1+ to) nil ’front-advance)))
(overlay-put o ’evaporate t)
(overlay-put o ’cae-org-fold-heading t)
(overlay-put o ’face
(save-excursion (goto-char from)
(face-at-point)))
(overlay-put o ’display “\n”))))
I modeled the code after the Backline package which does the same thing for
Outline, which uses overlays. I’m thinking now that we should not patch the
display engine.
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: StrawberryTea <look <at> strawberrytea.xyz>
>> Cc: yantar92 <at> posteo.net, 65896 <at> debbugs.gnu.org, kevin.legouguec <at> gmail.com
>> Date: Sat, 23 Sep 2023 14:05:53 -0500
>>
>> What I’m saying is that, I start up GDB and I set a breakpoint on Frecenter and
>> step into display_line, I can see the glyph row and how all the characters in
>> the folded heading have the heading except the newline character at the end. And
>> I would like for in this specific scenario, the face on the ellipsis to be used
>> (since it has extend) instead of the face on the newline which is the default
>> face. But I don’t know how to make that modification to the code yet.
>
> How will this behavior be limited to the case of folded text? Because
> when the text between the ellipsis and the newline is not invisible,
> the face of the newline should still be used, otherwise we will have
> an unacceptable change in behavior in the “normal” cases, when there’s
> no invisible folded text.
This bug report was last modified 1 year and 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.