Fix indirect buffer tracking
* lisp/org-fold-core.el (org-fold-core-decouple-indirect-buffer-folds): Actually, add newly created indirect buffer to the tracked list.
This commit is contained in:
parent
bb3800f904
commit
4d4d59874c
|
@ -641,13 +641,14 @@ This function is mostly intended to be used in
|
||||||
`clone-indirect-buffer-hook'."
|
`clone-indirect-buffer-hook'."
|
||||||
;; Add current buffer to the list of indirect buffers in the base buffer.
|
;; Add current buffer to the list of indirect buffers in the base buffer.
|
||||||
(when (buffer-base-buffer)
|
(when (buffer-base-buffer)
|
||||||
(with-current-buffer (buffer-base-buffer)
|
(let ((new-buffer (current-buffer)))
|
||||||
(setq-local org-fold-core--indirect-buffers
|
(with-current-buffer (buffer-base-buffer)
|
||||||
(let (bufs)
|
(setq-local org-fold-core--indirect-buffers
|
||||||
(org-fold-core-cycle-over-indirect-buffers
|
(let (bufs)
|
||||||
(push (current-buffer) bufs))
|
(org-fold-core-cycle-over-indirect-buffers
|
||||||
(push (current-buffer) bufs)
|
(push (current-buffer) bufs))
|
||||||
(delete-dups bufs)))))
|
(push new-buffer bufs)
|
||||||
|
(delete-dups bufs))))))
|
||||||
(when (and (buffer-base-buffer)
|
(when (and (buffer-base-buffer)
|
||||||
(eq org-fold-core-style 'text-properties)
|
(eq org-fold-core-style 'text-properties)
|
||||||
(not (memql 'ignore-indirect org-fold-core--optimise-for-huge-buffers)))
|
(not (memql 'ignore-indirect org-fold-core--optimise-for-huge-buffers)))
|
||||||
|
|
Loading…
Reference in New Issue