summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-04-19 15:01:56 +0200
committerYorhel <git@yorhel.nl>2019-04-19 15:01:58 +0200
commitcd38a62aa835e84af6920e75a264e4a80ce1ad10 (patch)
tree0ed215e8e25ce49711284e9c6653c9e541a7209d
parentec0de4afa8f6119a737f731433134bed4fc48f32 (diff)
Clear errno before getch()
Fixes #128.
-rw-r--r--src/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index a7dcea6..a9f4bdc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -86,6 +86,7 @@ int input_handle(int wait) {
return wait == 0 ? 1 : 0;
nodelay(stdscr, wait?1:0);
+ errno = 0;
while((ch = getch()) != ERR) {
if(ch == KEY_RESIZE) {
if(ncresize(min_rows, min_cols))