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
cce9438d9f
commit
f0ad161643
1 changed files with 3 additions and 4 deletions
|
@ -272,13 +272,12 @@ If on a:
|
||||||
(org-element-property :end lineage))
|
(org-element-property :end lineage))
|
||||||
(org-open-at-point arg))))
|
(org-open-at-point arg))))
|
||||||
|
|
||||||
|
((guard (org-element-property :checkbox (org-element-lineage context '(item) t)))
|
||||||
|
(org-toggle-checkbox))
|
||||||
|
|
||||||
(`paragraph
|
(`paragraph
|
||||||
(+org--toggle-inline-images-in-subtree))
|
(+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)
|
(if (or (org-in-regexp org-ts-regexp-both nil t)
|
||||||
(org-in-regexp org-tsr-regexp-both nil t)
|
(org-in-regexp org-tsr-regexp-both nil t)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue