Skip to content

Commit fe1f4f2

Browse files
committed
fixup! org-fold-core: Respect 'ignore-indirect optimization better
1 parent e9781f1 commit fe1f4f2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lisp/org-fold-core.el

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,9 @@ If GLOBAL is non-nil, do not make the property unique in the BUFFER."
461461
;; Using buffer-name is safe, since the only place where
462462
;; buffer-local text property actually matters is an indirect
463463
;; buffer, where the name cannot be same anyway.
464-
(if global 'global
464+
(if (or global
465+
(memql 'ignore-indirect org-fold-core--optimise-for-huge-buffers))
466+
'global
465467
(sxhash (buffer-name (or buffer (current-buffer)))))))))
466468

467469
(defsubst org-fold-core-get-folding-spec-from-folding-prop (folding-prop)
@@ -552,8 +554,7 @@ unless RETURN-ONLY is non-nil."
552554
org-fold-core--property-symbol-cache))))
553555
(prog1
554556
local-prop
555-
(unless (or return-only
556-
(memql 'ignore-indirect org-fold-core--optimise-for-huge-buffers))
557+
(unless return-only
557558
(with-current-buffer buf
558559
;; Update folding properties carried over from other
559560
;; buffer (implying that current buffer is indirect

0 commit comments

Comments
 (0)