org-activate-folds: Do not fontify newline after abbreviated links

* lisp/org.el (org-activate-folds): When a fold is created by link
abbreviation, and a link ends at eol, do not force the newline after
the ]] to have the same face as the link.

Reported-by: Rohit Patnaik <quanticle@quanticle.net>
Link: https://orgmode.org/list/6d440976-6747-4ce6-8913-b63931dd017f@app.fastmail.com
This commit is contained in:
Ihor Radchenko 2024-02-26 15:52:25 +03:00
parent 8bac4d386a
commit 9f6894c106
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 2 additions and 1 deletions

View File

@ -5814,7 +5814,8 @@ highlighting was done, nil otherwise."
(when next-unfolded-newline
(org-with-wide-buffer
(when (and (> (match-beginning 0) (point-min))
(org-fold-folded-p (1- (match-beginning 0))))
(org-fold-folded-p (1- (match-beginning 0)))
(not (org-fold-folded-p (1- (match-beginning 0)) 'org-link)))
(put-text-property
(match-beginning 0) (match-end 0)
'face