Skip to content

Commit 5f184b5

Browse files
committed
org-inlinetask.el: Fix visibility cycling for inlinetasks
* lisp/org-inlinetask.el (org-inlinetask-hide-tasks): Make sure that we loop over inlinetasks inside current section only. `org-inlinetask-goto-end' moves point to the end of the inlinetask element. If an inlinetask is followed by a heading, the function logic will treat the heading as the beginning of another inline task. Prevent it by moving the point at the end of the END line of the inlinetask. Fixes https://list.orgmode.org/orgmode/CAP7OBx+rs-7v4jstEFYC4u0=0NZ3xJKfb3CNrWeDvjmwRTvgxw@mail.gmail.com/
1 parent 2063596 commit 5f184b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lisp/org-inlinetask.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ This function is meant to be used in `org-cycle-hook'."
358358
(or (org-inlinetask-at-task-p)
359359
(and (outline-next-heading) (org-inlinetask-at-task-p)))
360360
(org-inlinetask-toggle-visibility)
361-
(org-inlinetask-goto-end))))))
361+
(org-inlinetask-goto-end)
362+
(backward-char))))))
362363

363364
(defun org-inlinetask-remove-END-maybe ()
364365
"Remove an END line when present."

0 commit comments

Comments
 (0)