fix the latest appearance of the dramsey backwards movement bug, cf.

Message-ID: <e3fded850705200935h6ac2c9ebgbc7a9b10ac034a49@mail.gmail.com>
and Message-ID: <Pine.BSM.4.64L.0705201659500.8619@odem.66h.42h.de>
This commit is contained in:
tg 2007-05-20 17:53:13 +00:00
parent 9e44be4713
commit 252861b156
3 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.104 2007/05/13 19:18:26 tg Exp $ # $MirOS: src/bin/mksh/check.t,v 1.105 2007/05/20 17:53:12 tg Exp $
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas 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: 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 $ # $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 # http://www.research.att.com/~gsf/public/ifs.sh
expected-stdout: expected-stdout:
@(#)MIRBSD KSH R29 2007/05/13 @(#)MIRBSD KSH R29 2007/05/20
description: description:
Check version of shell. Check version of shell.
category: pdksh category: pdksh

8
edit.c
View File

@ -5,7 +5,7 @@
#include "sh.h" #include "sh.h"
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.91 2007/05/13 17:51:20 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/edit.c,v 1.92 2007/05/20 17:53:13 tg Exp $");
/* tty driver characters we are interested in */ /* tty driver characters we are interested in */
typedef struct { typedef struct {
@ -1617,6 +1617,7 @@ x_del_back(int c __unused)
x_goto(xcp - 1); x_goto(xcp - 1);
} while ((++i < x_arg) && (xcp != xbuf)); } while ((++i < x_arg) && (xcp != xbuf));
x_delete(i, false); x_delete(i, false);
x_goto(xcp);
return KSTD; return KSTD;
} }
@ -1713,13 +1714,15 @@ static int
x_del_bword(int c __unused) x_del_bword(int c __unused)
{ {
x_delete(x_bword(), true); x_delete(x_bword(), true);
x_goto(xcp);
return KSTD; return KSTD;
} }
static int static int
x_mv_bword(int c __unused) x_mv_bword(int c __unused)
{ {
(void)x_bword(); x_bword();
x_goto(xcp);
return KSTD; return KSTD;
} }
@ -1897,6 +1900,7 @@ x_mv_back(int c __unused)
if (xcp == xbuf) if (xcp == xbuf)
break; break;
} }
x_goto(xcp);
return KSTD; return KSTD;
} }

4
sh.h
View File

@ -8,8 +8,8 @@
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */ /* $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 $ */ /* $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.132 2007/05/13 19:18:26 tg 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/13" #define MKSH_VERSION "R29 2007/05/20"
#if HAVE_SYS_PARAM_H #if HAVE_SYS_PARAM_H
#include <sys/param.h> #include <sys/param.h>