fix(org): list checkbox toggle on RET
A subtle change in the way org-toggle-checkbox handles its prefix argument changed how RET (+org/dwim-at-point) handled list checkboxes (incorrectlying swapping [ ] with [-], but not back, unless the cursor was directly on top of the checkbox).
This commit is contained in:
parent
a8496b258a
commit
9fce355e8e
1 changed files with 3 additions and 4 deletions
|
@ -272,13 +272,12 @@ If on a:
|
|||
(org-element-property :end lineage))
|
||||
(org-open-at-point arg))))
|
||||
|
||||
((guard (org-element-property :checkbox (org-element-lineage context '(item) t)))
|
||||
(org-toggle-checkbox))
|
||||
|
||||
(`paragraph
|
||||
(+org--toggle-inline-images-in-subtree))
|
||||
|
||||
((guard (org-element-property :checkbox (org-element-lineage context '(item) t)))
|
||||
(let ((match (and (org-at-item-checkbox-p) (match-string 1))))
|
||||
(org-toggle-checkbox (if (equal match "[ ]") '(16)))))
|
||||
|
||||
(_
|
||||
(if (or (org-in-regexp org-ts-regexp-both nil t)
|
||||
(org-in-regexp org-tsr-regexp-both nil t)
|
||||
|
|
Loading…
Reference in a new issue