From 0693cb0572f87a51e2cd719e4eb00a5152857d0a Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Tue, 25 Dec 2001 09:59:38 +0000 Subject: [w3m-dev 02721] From: Fumitoshi UKAI --- main.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 3925260..2f79a01 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.44 2001/12/25 09:08:58 ukai Exp $ */ +/* $Id: main.c,v 1.45 2001/12/25 09:59:39 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include @@ -47,6 +47,7 @@ static MySignalHandler SigAlarm(SIGNAL_ARG); #ifdef SIGWINCH static int resized = 0; +MySignalHandler resize_handler(SIGNAL_ARG); #endif #ifdef USE_MARK @@ -948,8 +949,12 @@ MAIN(int argc, char **argv, char **envp) if (Currentbuf) displayBuffer(Currentbuf, B_FORCE_REDRAW); } + signal(SIGWINCH, resize_handler); #endif c = getch(); +#ifdef SIGWINCH + signal(SIGWINCH, resize_hook); +#endif #ifdef USE_ALARM if (alarm_sec > 0) { alarm(0); @@ -1181,6 +1186,17 @@ resize_hook(SIGNAL_ARG) signal(SIGWINCH, resize_hook); SIGNAL_RETURN; } + +MySignalHandler +resize_handler(SIGNAL_ARG) +{ + setlinescols(); + setupscreen(); + if (Currentbuf) + displayBuffer(Currentbuf, B_FORCE_REDRAW); + signal(SIGWINCH, resize_handler); + SIGNAL_RETURN; +} #endif /* SIGWINCH */ /* -- cgit v1.2.3