Browse Source

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/
Ihor Radchenko 3 years ago
parent
commit
5f184b5f23
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org-inlinetask.el

+ 2 - 1
lisp/org-inlinetask.el

@@ -358,7 +358,8 @@ This function is meant to be used in `org-cycle-hook'."
 	   (or (org-inlinetask-at-task-p)
 	       (and (outline-next-heading) (org-inlinetask-at-task-p)))
 	 (org-inlinetask-toggle-visibility)
-	 (org-inlinetask-goto-end))))))
+	 (org-inlinetask-goto-end)
+         (backward-char))))))
 
 (defun org-inlinetask-remove-END-maybe ()
   "Remove an END line when present."