summaryrefslogtreecommitdiff
path: root/bin/ksh/emacs.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ksh/emacs.c')
-rw-r--r--bin/ksh/emacs.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/bin/ksh/emacs.c b/bin/ksh/emacs.c
index db515363a1d..d0d756651e2 100644
--- a/bin/ksh/emacs.c
+++ b/bin/ksh/emacs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: emacs.c,v 1.4 1997/06/19 13:58:39 kstailey Exp $ */
+/* $OpenBSD: emacs.c,v 1.5 1998/06/25 19:01:51 millert Exp $ */
/*
* Emacs-like command line editing and history
@@ -1244,12 +1244,12 @@ x_meta_yank(c)
len = strlen(killstack[killtp]);
x_goto(xcp - len);
x_delete(len, FALSE);
- do {
+ do {
if (killtp == 0)
killtp = KILLSIZE - 1;
else
killtp--;
- } while (killstack[killtp] == 0);
+ } while (killstack[killtp] == 0);
x_ins(killstack[killtp]);
return KSTD;
}
@@ -2012,15 +2012,8 @@ x_prev_histword(c)
{
register char *rcp;
char *cp;
- char **hp;
- hp = x_histp-1;
- if (hp < history || hp > histptr)
- {
- x_e_putc(BEL);
- return KSTD;
- }
- cp = *hp;
+ cp = *histptr;
if (x_arg_defaulted) {
rcp = &cp[strlen(cp) - 1];
/*