diff --git a/edit.c b/edit.c index 65ec1f6..b1494c7 100644 --- a/edit.c +++ b/edit.c @@ -5,7 +5,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.76 2007/01/12 10:18:20 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.77 2007/01/14 01:09:08 tg Exp $"); /* tty driver characters we are interested in */ typedef struct { @@ -129,7 +129,8 @@ x_read(char *buf, size_t len) i = -1; /* internal error */ x_mode(false); #if defined(TIOCGWINSZ) && defined(SIGWINCH) - check_sigwinch(); + if (got_sigwinch) + check_sigwinch(); #endif return i; } @@ -2235,9 +2236,9 @@ x_mv_begin(int c __unused) static int x_draw_line(int c __unused) { + check_sigwinch(); x_redraw(-1); return KSTD; - } /* Redraw (part of) the line. If limit is < 0, the everything is redrawn diff --git a/mksh.1 b/mksh.1 index 3cfeda1..7dba95d 100644 --- a/mksh.1 +++ b/mksh.1 @@ -1,7 +1,7 @@ -.\" $MirOS: src/bin/mksh/mksh.1,v 1.73 2007/01/06 18:48:26 tg Exp $ +.\" $MirOS: src/bin/mksh/mksh.1,v 1.74 2007/01/14 01:09:09 tg Exp $ .\" $OpenBSD: ksh.1,v 1.118 2006/11/30 08:47:58 jmc Exp $ .\" -.Dd January 6, 2007 +.Dd January 14, 2007 .Dt MKSH 1 .Os MirBSD .Sh NAME @@ -4553,6 +4553,7 @@ word of the previous command is inserted at the cursor. The following character is taken literally rather than as an editing command. .It redraw: ^L Reprints the last line of the prompt string and the current input line. +Also checks terminal size (columns and lines) as reported by stty for changes. .It Xo search-character-backward: .Op Ar n .No ^[^]