From 1cb44e238f564106c7c137c0241bb42162dfe027 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Tue, 23 Oct 2018 21:08:21 +0300 Subject: memview: make error prompts go away with any press --- src/memview.c | 3 +-- 1 file changed, 1 insertion(+), 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 -- cgit v1.2.3