I can confirm the issue you've outlined on latest 'main'.
To me it looks like the problem is in `org-inline-hide-tasks'.
I don't use inline tasks, so I'm not sure what the exact expected
behavior is,
but that function uses a `while' during `org-cycle-hook' to
iterate through all of the headings.
My intuition is that it's overshooting a boundary and toggling
visibility on more than it should.
Does the attached patch behave more in line with what you expect?
>From 04ed84c36a4cc04838b5b75e18858996af125f77 Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer <iarchivedmywholel...@gmail.com>
Date: Thu, 30 Sep 2021 23:31:50 -0400
Subject: [PATCH] org-inlinetask.el: Limit children visibility toggle to
subtree
* org-inlinetask: (org-inlinetask-toggle-visibility): Limit toggling
to subtree.
Not sure if this is correct behavior or not. Just a suggestion.
---
lisp/org-inlinetask.el | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index 3379a2e46..3bdc03ae4 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -334,11 +334,13 @@ This function is meant to be used in `org-cycle-hook'."
(org-inlinetask-goto-end)))))
(`children
(save-excursion
- (while
- (or (org-inlinetask-at-task-p)
- (and (outline-next-heading) (org-inlinetask-at-task-p)))
- (org-inlinetask-toggle-visibility)
- (org-inlinetask-goto-end))))))
+ (save-restriction
+ (org-narrow-to-subtree)
+ (while
+ (or (org-inlinetask-at-task-p)
+ (and (outline-next-heading) (org-inlinetask-at-task-p)))
+ (org-inlinetask-toggle-visibility)
+ (org-inlinetask-goto-end)))))))
(defun org-inlinetask-remove-END-maybe ()
"Remove an END line when present."
--
2.33.0