From 4087d59a055f7e3be88b9b66ba6b41dcc107b6b5 Mon Sep 17 00:00:00 2001 From: nick black Date: Wed, 24 Nov 2021 12:57:24 -0500 Subject: [PATCH] [ncneofetch] return error on failure to emit newline --- src/fetch/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fetch/main.c b/src/fetch/main.c index cfebe938d..44276f77a 100644 --- a/src/fetch/main.c +++ b/src/fetch/main.c @@ -578,7 +578,11 @@ infoplane_notcurses(struct notcurses* nc, const fetched_info* fi, if(chend > parend){ ncplane_move_rel(infop, -(chend - parend), 0); } - ncplane_putchar(std, '\n'); + if(ncplane_putchar_yx(std, ncplane_abs_y(infop) + ncplane_dim_y(infop) - 1, + ncplane_abs_x(infop) + ncplane_dim_x(infop) + 1, + '\n') != 1){ + return -1; + } if(notcurses_render(nc)){ return -1; }