org-fold-show-set-visibility: Fix edge case when folded region is at BOB

This commit is contained in:
Ihor Radchenko 2022-01-29 14:23:13 +08:00
parent 0daa209a74
commit 0bca8bc418
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -840,7 +840,7 @@ DETAIL is either nil, `minimal', `local', `ancestors',
(org-with-point-at (car region)
(beginning-of-line)
(let (font-lock-extend-region-functions)
(font-lock-fontify-region (1- (car region)) (cdr region))))))
(font-lock-fontify-region (max (point-min) (1- (car region))) (cdr region))))))
(when region
(org-fold-region (car region) (cdr region) nil))))
(unless (org-before-first-heading-p)