diff --git a/check.t b/check.t index 5d50357..a7ce1bb 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.105 2007/05/20 17:53:12 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.106 2007/05/21 19:25:30 tg Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ @@ -7,7 +7,7 @@ # http://www.research.att.com/~gsf/public/ifs.sh expected-stdout: - @(#)MIRBSD KSH R29 2007/05/20 + @(#)MIRBSD KSH R29 2007/05/21 description: Check version of shell. category: pdksh diff --git a/edit.c b/edit.c index fddb593..b68eabc 100644 --- a/edit.c +++ b/edit.c @@ -5,7 +5,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.93 2007/05/21 12:24:44 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.94 2007/05/21 19:25:31 tg Exp $"); /* tty driver characters we are interested in */ typedef struct { @@ -1602,6 +1602,8 @@ x_ins(const char *s) while (cp > xcp) x_bs2(cp = utf_backch(cp)); } + if (xlp == xep - 1) + x_redraw(xx_cols); x_adj_ok = 1; return 0; } @@ -1693,9 +1695,9 @@ x_delete(int nc, int push) * there is no need to ' ','\b'. * But if we must, make sure we do the minimum. */ - if ((i = xx_cols - 2 - x_col) > 0) { + if ((i = xx_cols - 2 - x_col) > 0 || xep - xlp == 0) { nw = (nw < i) ? nw : i; - i = nw; + i = ++nw; while (i--) x_e_putc2(' '); i = nw; diff --git a/sh.h b/sh.h index 8453cbd..96a98eb 100644 --- a/sh.h +++ b/sh.h @@ -8,8 +8,8 @@ /* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */ /* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */ -#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.133 2007/05/20 17:53:13 tg Exp $" -#define MKSH_VERSION "R29 2007/05/20" +#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.134 2007/05/21 19:25:32 tg Exp $" +#define MKSH_VERSION "R29 2007/05/21" #if HAVE_SYS_PARAM_H #include