No need to resizeterm() if size not changed.

On 'fg' just restore old screen contents.
This commit is contained in:
dsl 2003-07-05 08:05:51 +00:00
parent ccd442eae3
commit aaba6e7d29
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.32 2003/05/28 20:17:14 dsl Exp $ */
/* $NetBSD: main.c,v 1.33 2003/07/05 08:05:51 dsl Exp $ */
/*-
* Copyright (c) 1980, 1992, 1993
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1992, 1993\n\
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
#endif
__RCSID("$NetBSD: main.c,v 1.32 2003/05/28 20:17:14 dsl Exp $");
__RCSID("$NetBSD: main.c,v 1.33 2003/07/05 08:05:51 dsl Exp $");
#endif /* not lint */
#include <sys/param.h>
@ -329,7 +329,8 @@ redraw(int signo)
sigaddset(&set, SIGALRM);
sigprocmask(SIG_BLOCK, &set, NULL);
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &win) != -1) {
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &win) != -1 &&
(win.ws_row != LINES || win.ws_col != COLS)) {
resizeterm(win.ws_row, win.ws_col);
CMDLINE = LINES - 1;
labels();