diff --git a/check.t b/check.t index 78afdba..c71430b 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.288 2009/06/11 12:42:15 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.289 2009/07/05 13:56:46 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 $ @@ -25,7 +25,7 @@ # http://www.research.att.com/~gsf/public/ifs.sh expected-stdout: - @(#)MIRBSD KSH R38 2009/06/10 + @(#)MIRBSD KSH R38 2009/07/05 description: Check version of shell. stdin: diff --git a/edit.c b/edit.c index aa24da8..ed0f41f 100644 --- a/edit.c +++ b/edit.c @@ -1,7 +1,7 @@ /* $OpenBSD: edit.c,v 1.33 2007/08/02 10:50:25 fgsch Exp $ */ /* $OpenBSD: edit.h,v 1.8 2005/03/28 21:28:22 deraadt Exp $ */ /* $OpenBSD: emacs.c,v 1.42 2009/06/02 06:47:47 halex Exp $ */ -/* $OpenBSD: vi.c,v 1.25 2009/06/10 15:08:46 merdely Exp $ */ +/* $OpenBSD: vi.c,v 1.26 2009/06/29 22:50:19 martynas Exp $ */ /*- * Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009 @@ -25,7 +25,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.171 2009/06/11 12:42:16 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.172 2009/07/05 13:56:47 tg Exp $"); /* tty driver characters we are interested in */ typedef struct { @@ -3871,13 +3871,17 @@ vi_hook(int ch) refresh(0); return (0); } else if (ch == edchars.werase) { - int i; - int n = srchlen; + int i, n = srchlen; + struct edstate new_es, *save_es; + + new_es.cursor = n; + new_es.cbuf = locpat; + + save_es = es; + es = &new_es; + n = backword(1); + es = save_es; - while (n > 0 && !ksh_isalnux(locpat[n - 1])) - n--; - while (n > 0 && ksh_isalnux(locpat[n - 1])) - n--; for (i = srchlen; --i >= n; ) es->linelen -= char_len((unsigned char)locpat[i]); srchlen = n; diff --git a/sh.h b/sh.h index 093cd33..88e6b3a 100644 --- a/sh.h +++ b/sh.h @@ -122,9 +122,9 @@ #define __SCCSID(x) __IDSTRING(sccsid,x) #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.310 2009/06/10 18:12:48 tg Rel $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.311 2009/07/05 13:56:48 tg Exp $"); #endif -#define MKSH_VERSION "R38 2009/06/10" +#define MKSH_VERSION "R38 2009/07/05" #ifndef MKSH_INCLUDES_ONLY