diff options
author | Michael Erdely <merdely@cvs.openbsd.org> | 2009-06-10 15:08:47 +0000 |
---|---|---|
committer | Michael Erdely <merdely@cvs.openbsd.org> | 2009-06-10 15:08:47 +0000 |
commit | fde44043acf80d65416bb88411c174a82c8ab336 (patch) | |
tree | 61f67d38eace9c12bc64fca6357d914653a42bd5 /bin/ksh/vi.c | |
parent | 7c3c29cdf5222d9f77f37b1e18e89497d7d42272 (diff) |
Fix problem with ^w fix that broke 'B'
Found by Daniel LEVAI
Fix by Darrin Chandler
ok millert@
Diffstat (limited to 'bin/ksh/vi.c')
-rw-r--r-- | bin/ksh/vi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/ksh/vi.c b/bin/ksh/vi.c index 321def17b14..6acf6ea96c3 100644 --- a/bin/ksh/vi.c +++ b/bin/ksh/vi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vi.c,v 1.24 2009/06/04 04:03:22 merdely Exp $ */ +/* $OpenBSD: vi.c,v 1.25 2009/06/10 15:08:46 merdely Exp $ */ /* * vi command editing @@ -596,7 +596,7 @@ vi_insert(int ch) } if (ch == edchars.werase) { if (es->cursor != 0) { - tcursor = Backword(1); + tcursor = backword(1); memmove(&es->cbuf[tcursor], &es->cbuf[es->cursor], es->linelen - es->cursor); es->linelen -= es->cursor - tcursor; @@ -1598,9 +1598,9 @@ Backword(int argcnt) ncursor = es->cursor; while (ncursor > 0 && argcnt--) { - while (--ncursor >= 0 && !is_wordch(es->cbuf[ncursor])) + while (--ncursor >= 0 && isspace(es->cbuf[ncursor])) ; - while (ncursor >= 0 && is_wordch(es->cbuf[ncursor])) + while (ncursor >= 0 && !isspace(es->cbuf[ncursor])) ncursor--; ncursor++; } |