From 59a8c7e4ae0d424319bccc0ffa6ffa8ae88d2ba6 Mon Sep 17 00:00:00 2001 From: Christoph Lohmann <20h@r-36.net> Date: Sun, 20 Dec 2020 16:34:20 +0100 Subject: [PATCH] Raise SIGWINCH in SIGHUP, so refresh is safe in ncurses. --- catpoint.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/catpoint.c b/catpoint.c index 1843422..7945e48 100644 --- a/catpoint.c +++ b/catpoint.c @@ -60,11 +60,8 @@ reloadcurrentslide(int sig) { loadcurrentslide(slidefiles, currentslide); - if (sig == SIGHUP) { - clear(); - refresh(); - printw("%.*s", currentslidelen, currentslidep); - } + if (sig == SIGHUP) + raise(SIGWINCH); /* Redisplay slide. */ } void