Fix +org/insert-item when point is in a link

This commit is contained in:
Henrik Lissner 2017-10-08 01:50:57 +02:00
parent 8499727a17
commit 934756700d
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -202,12 +202,9 @@ wrong places)."
('above (+org/table-prepend-row-or-shift-up))))
((memq type '(headline inlinetask))
(let* ((subcontext (org-element-context))
(level (save-excursion
(org-back-to-heading)
(if (eq (org-element-type subcontext) 'headline)
(org-element-property :level subcontext)
1))))
(let ((level (if (eq (org-element-type context) 'headline)
(org-element-property :level context)
1)))
(pcase direction
('below
(let ((at-eol (= (point) (1- (line-end-position)))))