diff options
author | Leon Rische <leon.rische@me.com> | 2020-09-07 16:38:30 +0200 |
---|---|---|
committer | Leon Rische <leon.rische@me.com> | 2020-09-07 16:38:30 +0200 |
commit | 059efdb22d81dc7e6d3f4665385b091a0fa5fcf6 (patch) | |
tree | 0f9f9c9421ced82ce251795fa822d9206c4cf984 | |
parent | 8dc66cf2ec3a815ae6d6f81db58a214036583ed4 (diff) |
Refactor setup / flip of double cards
-rw-r--r-- | org-fc.el | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -645,18 +645,22 @@ Argument UPDATE-FN Function to update a card when it's contents have changed." (pcase position ("front" (org-fc-type-normal-setup position)) ("back" - (org-show-subtree) + (outline-hide-subtree) (if (org-fc-has-back-heading-p) - (setq org-fc-type-double--overlay (org-fc-hide-content "[...]\n")) - (setq org-fc-type-double--overlay (org-fc-hide-heading "[...]")))) + (outline-hide-entry) + (org-show-entry) + (setq org-fc-type-double--overlay (org-fc-hide-heading "[...]")))) (_ (error "Invalid double position %s" position)))) (defun org-fc-type-double-flip () "Flip a double card." (if org-fc-type-double--overlay (delete-overlay org-fc-type-double--overlay)) - (org-show-subtree) + (org-show-entry) + (org-show-children) (org-fc-with-point-at-back-heading + (org-show-entry) + (org-show-children) (org-fc-show-latex))) (org-fc-register-type |