From a259c5e818b83e9ccd346d52c654942f0e18814a Mon Sep 17 00:00:00 2001 From: phamousq Date: Wed, 17 May 2023 15:24:26 -0500 Subject: [PATCH] reveal flashcard back with any specified answer key --- vim_shortcuts.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vim_shortcuts.py b/vim_shortcuts.py index 3ac9e8c..3499518 100644 --- a/vim_shortcuts.py +++ b/vim_shortcuts.py @@ -14,13 +14,17 @@ def answer_card(self: Reviewer, grade: str): try: + if ( + self.state == "question" + and grade != None + and config["press_good_key_to_flip_card"] is True + ): + return self._getTypedAnswer() if grade == 'again': return self._answerCard(1) if grade == 'hard' and self._defaultEase() == 3: return self._answerCard(2) if grade == 'good': - if self.state == "question" and config["press_good_key_to_flip_card"] is True: - return self._getTypedAnswer() return self._answerCard(self._defaultEase()) if grade == 'easy': return self._answerCard(cast(Literal[3, 4], self._defaultEase() + 1))