Enable user to quit during review session
John Smith

John Smith commited on 2022-358 13:18:14
Showing 1 changed files, with 4 additions and 0 deletions.


Adding a "q" to the end of the ease-response at any prompt in
a review session makes Memoire quit the review session, overriding
the number specified at the start while quitting gracefully.
The user no longer needs to know in advance exactly how many prompts
they will be able to review in a session.
... ...
@@ -299,6 +299,10 @@ local actions = {
299 299
                     review.update(deck[ip[1]][ip[2]], st, sc, config)
300 300
                 end
301 301
                 clear()
302
+                if resp:sub(#resp):lower() == "q" then
303
+                    climn = ind
304
+                    break
305
+                end
302 306
             end
303 307
             if #ctrt > 0 then
304 308
                 local endt = os.time()
305 309