org-fold-core-region: Fix removing non-fold overlays
* lisp/org-fold-core.el (org-fold-core-region): Do not clear all the overlays in region when unfolding and when SPEC-OR-ALIAS is nil. Reported-by: Bruno Barbier <brubar.cs@gmail.com> Link: https://orgmode.org/list/65f4a408.df0a0220.5debf.2c65@mx.google.com
This commit is contained in:
parent
28dc5dd1ac
commit
8b73c8b98f
|
@ -997,7 +997,8 @@ If SPEC-OR-ALIAS is omitted and FLAG is nil, unfold everything in the region."
|
||||||
(when spec (org-fold-core--check-spec spec))
|
(when spec (org-fold-core--check-spec spec))
|
||||||
(with-silent-modifications
|
(with-silent-modifications
|
||||||
(org-with-wide-buffer
|
(org-with-wide-buffer
|
||||||
(when (eq org-fold-core-style 'overlays) (remove-overlays from to 'invisible spec))
|
(when (and (eq org-fold-core-style 'overlays) spec)
|
||||||
|
(remove-overlays from to 'invisible spec))
|
||||||
(if flag
|
(if flag
|
||||||
(if (not spec)
|
(if (not spec)
|
||||||
(error "Calling `org-fold-core-region' with missing SPEC")
|
(error "Calling `org-fold-core-region' with missing SPEC")
|
||||||
|
|
Loading…
Reference in New Issue