diff options
author | Thanos Apollo <[email protected]> | 2023-12-28 13:29:09 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-28 13:29:09 +0200 |
commit | a408e71eb2ebf2ccd186bcff83aff66884c204e1 (patch) | |
tree | d5f24a07008194d2a6c4d836888a0746b6493c11 /gnosis.el | |
parent | 8f5316bd10b9f7702485fe3da23d0faeb52a9112 (diff) |
gnosis-review: Fix bugs on clozes, reveal one cloze per loop
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -565,13 +565,17 @@ If user-input is equal to CLOZE, return t." "Review cloze type note for ID." (let* ((main (gnosis-get 'main 'notes `(= id ,id))) (clozes (gnosis-get 'answer 'notes `(= id ,id))) + (clozes-num (length clozes)) + (num 0) (hint (gnosis-get 'options 'notes `(= id ,id)))) (gnosis-display--image id) (gnosis-display--cloze-sentence main clozes) (gnosis-display--hint hint) (cl-loop for cloze in clozes do (let ((input (gnosis-review-cloze--input cloze))) - (when (equal (car input) nil) + (if (equal (car input) t) + (progn (gnosis-review-cloze--reveal (list (nth num clozes))) + (setf num (1+ num))) (gnosis-review-cloze--reveal clozes) (gnosis-display--cloze-user-answer (cdr input) t) (gnosis-review--update id 0) |