Fix +org/insert-item in nested plain lists

Would prepend new list items in the middle of plain lists, rather than
before them.
This commit is contained in:
Henrik Lissner 2018-07-04 14:19:22 +02:00
parent 99ab08afe8
commit c9ffa063e7
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -169,7 +169,7 @@ wrong places)."
(org-end-of-line)))
(insert "\n" (make-string pad 32) (or marker ""))))
(`above
(goto-char (line-beginning-position))
(org-beginning-of-item)
(if (and marker (string-match-p "[0-9]+[).]" marker))
(org-insert-item)
(insert (make-string pad 32) (or marker ""))