GNU bug report logs -
#59141
28.1.90; Face :extend when all the line but trailing \n is invisible
Previous Next
Reported by: Ihor Radchenko <yantar92 <at> posteo.net>
Date: Wed, 9 Nov 2022 02:24:01 UTC
Severity: normal
Tags: fixed
Found in version 28.1.90
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 59141 <at> debbugs.gnu.org (full text, mbox):
>> I do not see anything wrong on the Org side.
>> Maybe Emacs should not apply :extent t attribute to the newline when the
>> text in fontified line is hidden?
>
> IIUC, this is bug#52587?
And bug#53981.
> The conclusion there, AFAIR, was "it's unfortunate, but that's the
> design for now; let's rediscuss when we see some patches for outline.el
> (or the specific modes that use extended backgrounds)".
Here is an experimental patch for outline.el
that demonstrates a possible way to fix this:
diff --git a/lisp/outline.el b/lisp/outline.el
index a646f71db8..73ae707821 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -930,7 +930,8 @@ outline-flag-region
;; We use `front-advance' here because the invisible text begins at the
;; very end of the heading, before the newline, so text inserted at FROM
;; belongs to the heading rather than to the entry.
- (let ((o (make-overlay from to nil 'front-advance)))
+ (let ((o (make-overlay from (1+ to))))
+ (overlay-put o 'display "\n")
(overlay-put o 'evaporate t)
(overlay-put o 'invisible 'outline)
(overlay-put o 'isearch-open-invisible
This bug report was last modified 1 year and 112 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.