mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-05 19:12:56 +00:00
org-fold-core-region: Fix another edge case with newline fontification
* lisp/org-fold-core.el (org-fold-core-region): Do not just update folds before/after. Refresh newlines created by splicing a fold by unfolding in the middle of an existing fold. Then, fold list between from/to will not cover the folds right before from and right after to. Reported-by: StrawberryTea <look@strawberrytea.xyz> Link: https://orgmode.org/list/878r2xfk60.fsf@strawberrytea.xyz
This commit is contained in:
parent
c2ea553be8
commit
1151c614b3
|
@ -1040,6 +1040,10 @@ If SPEC-OR-ALIAS is omitted and FLAG is nil, unfold everything in the region."
|
|||
;; last as per Emacs defaults. This makes :extend faces span
|
||||
;; past the ellipsis. See bug#65896. The face properties are
|
||||
;; assigned via `org-activate-folds'.
|
||||
(when (equal ?\n (char-after from))
|
||||
(font-lock-flush from (1+ from)))
|
||||
(when (equal ?\n (char-after to))
|
||||
(font-lock-flush to (1+ to)))
|
||||
(dolist (region (org-fold-core-get-regions :from from :to to :specs spec))
|
||||
(when (equal ?\n (char-after (cadr region)))
|
||||
(font-lock-flush (cadr region) (1+ (cadr region))))
|
||||
|
|
Loading…
Reference in a new issue