bug-gtypist
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gtypist] Bug fix: end of lesson answer handling


From: Yves Martin
Subject: [bug-gtypist] Bug fix: end of lesson answer handling
Date: Sat, 06 Aug 2016 16:02:28 +0200

 Hello,

I would like to report the following error in answer processing
to the question "Press R to repeat, N for next exercise or E to exit"

Current behaviour of "N" answer is same as "R", it repeats current
lesson.

Here is a patch proposal to get R, N and E processed the expected way:

diff --git a/src/gtypist.c b/src/gtypist.c
index 78a1146..a079080 100644
--- a/src/gtypist.c
+++ b/src/gtypist.c
@@ -747,11 +747,11 @@ do_drill( FILE *script, char *line ) {
         rc = do_query_repeat (script, FALSE);
       else
         rc = do_query_repeat (script, TRUE);
-      if (rc == 'E') {
+      if (rc == 'N') {
         seek_done = TRUE;
         break;
       }
-      if (rc == 'N')
+      if (rc == 'E')
         break;
 
     }

I decided to invert E and N blocks as seek_done = TRUE seems useless to
exit the lesson.

Thank you for maintaining this useful GNU tool gtypist is.
Best regards
Yves Martin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]