[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 1151c614b3: org-fold-core-region: Fix another edge
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 1151c614b3: org-fold-core-region: Fix another edge case with newline fontification |
Date: |
Tue, 5 Mar 2024 03:58:58 -0500 (EST) |
branch: externals/org
commit 1151c614b32b2cfb5dc62452118c4ac0ef03b1f8
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
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
---
lisp/org-fold-core.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el
index e0666c5163..dda982204e 100644
--- a/lisp/org-fold-core.el
+++ b/lisp/org-fold-core.el
@@ -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))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org 1151c614b3: org-fold-core-region: Fix another edge case with newline fontification,
ELPA Syncer <=