diff options
author | Leon Rische <leon.rische@me.com> | 2020-06-25 17:28:14 +0200 |
---|---|---|
committer | Leon Rische <leon.rische@me.com> | 2020-06-25 17:28:14 +0200 |
commit | 3e6b2765ca7304d1aa809da0cf62f8d3a72b9075 (patch) | |
tree | 963ba68bd5b099810a143b77ba92b7ea5117b7c5 /org-fc.el | |
parent | b9d2465d5ee138a3d9eea53c280ee5ac43b045aa (diff) |
Reset review when suspending cards
Diffstat (limited to 'org-fc.el')
-rw-r--r-- | org-fc.el | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -1761,7 +1761,6 @@ Valid contexts: (org-fc-set-header-line) (goto-char (point-min)) - (org-fc-show-all) (org-fc-id-goto id path) (org-fc-indent) @@ -1826,9 +1825,7 @@ same ID as the current card in the session." (delta (- now org-fc-timestamp))) (org-fc-session-add-rating org-fc-review--current-session rating) (org-fc-review-update-data path id position rating delta) - (org-fc-show-all) - (org-fc-reset-header-line) - (org-fc-review-rate-mode -1) + (org-fc-review-reset) (save-buffer) (unless org-fc-reviewing-existing-buffer (kill-buffer)) @@ -1861,6 +1858,7 @@ same ID as the current card in the session." "Suspend card and proceed to next." (interactive) (org-fc-suspend-card) + (org-fc-review-reset) (org-fc-review-next-card)) (defun org-fc-review-update-data (path id position rating delta) @@ -1902,16 +1900,20 @@ rating the card." (org-fc-timestamp-in next-interval))) (org-fc-set-review-data data))))))) -;;;###autoload -(defun org-fc-review-quit () - "Quit the review, remove all overlays from the buffer." - (interactive) +(defun org-fc-review-reset () + "Reset the buffer to its state before the review." (org-fc-review-rate-mode -1) (org-fc-review-flip-mode -1) - (setq org-fc-review--current-session nil) (org-fc-reset-header-line) (org-fc-show-all)) +;;;###autoload +(defun org-fc-review-quit () + "Quit the review, remove all overlays from the buffer." + (interactive) + (org-fc-review-reset) + (setq org-fc-review--current-session nil)) + ;;; Dashboard (defun org-fc--hashtable-to-alist (ht) |