summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-10-13 23:58:21 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-10-13 23:58:21 (EDT)
commit42932fb35021825819884e02cfc867cff5f605ec (patch)
tree562eb8a33a7ba8d480219bbfafe70e692c4bde29
parent877f229182197be2cdd0a9ac7a661d6a6015841c (diff)
downloadtimeteller-42932fb35021825819884e02cfc867cff5f605ec.zip
timeteller-42932fb35021825819884e02cfc867cff5f605ec.tar.gz
timeteller-42932fb35021825819884e02cfc867cff5f605ec.tar.bz2
screen_main(): Filter out multi-char keys
For example, "ESC [ A" is the up key.
-rw-r--r--src/screen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c
index dbcfd0b..5ffe47f 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -81,6 +81,7 @@ screen_main(struct screen *screen, struct speech *speech)
case 'q':
return true;
default:
+ while (wgetch(screen->win) != ERR);
play = true;
}