summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-10-23 21:08:21 +0300
committerJari Vetoniemi <mailroxas@gmail.com>2018-10-23 21:08:21 +0300
commit1cb44e238f564106c7c137c0241bb42162dfe027 (patch)
tree969f73c62a8907fc58002058cefdf18cbfa7d6c8
parent18e51d1531cda874ad3ffbfb7dd5cd2f2342513c (diff)
memview: make error prompts go away with any press
-rw-r--r--src/memview.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/memview.c b/src/memview.c
index be167bb..3e13cc1 100644
--- a/src/memview.c
+++ b/src/memview.c
@@ -612,8 +612,7 @@ error(const char *fmt, ...)
screen_nprint(ctx.term.ws.w + sizeof(FMT(FG RED) FMT(PLAIN)), FMT(FG RED) "error: " FMT(PLAIN));
va_list ap; va_start(ap, fmt); screen_vnprintf(ctx.term.ws.w - sizeof("error:"), fmt, ap); va_end(ap);
screen_flush();
- for (char input = 0; input != 0x04 && input != 0x1b && input != '\n';)
- fread(&input, 1, 1, TERM_STREAM);
+ for (char input = 0; input == 0;) fread(&input, 1, 1, TERM_STREAM);
}
static void