Archive Subtree crashes the Mac editor in folded files #86

closed cmc opened this on 2026-10-19 19:59 UTC

Discussion

cmc 2026-10-19 19:59 UTC

Archive Subtree from the Mac editor crashes the app (stack overflow) in a file with #+STARTUP: overview, for any heading.

OrgEditor.update loads the new text before setting the mapped folds. Replacing the storage moves the caret to the new end; when that falls inside a stale fold range, selectionChanged() jumps to the fold's old end, which is clamped back to the same offset, and recurses.

Fixed in 7e166e6 (!371).

cmc 2026-10-19 19:59 UTC

Fixed in 7e166e6, merge request !371.