summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/memview.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memview.c b/src/memview.c
index c64d9fd..8852da8 100644
--- a/src/memview.c
+++ b/src/memview.c
@@ -358,7 +358,7 @@ draw_error(const char *line, void *data)
(void)data;
size_t w = snprintf(NULL, 0, "%s", line); w = (w < ctx.term.ws.w ? w : ctx.term.ws.w);
screen_cursor(ctx.term.ws.w / 2 - w / 2, ctx.term.ws.h / 2);
- screen_nprintf(ctx.term.ws.w - ctx.term.cur.x, "%s", line);
+ screen_nprintf(ctx.term.ws.w - ctx.term.cur.x * (ctx.term.cur.x < ctx.term.ws.w), "%s", line);
}
static void