summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormerdely <merdely@openbsd.org>2009-06-04 04:03:22 +0000
committermerdely <merdely@openbsd.org>2009-06-04 04:03:22 +0000
commit8403628343d4cfbc2702861d365174698d0d3dca (patch)
treef238373431c8ea1e65dd222014f0c113683b79e3
parentProper error handling in clntraw_create: (diff)
downloadwireguard-openbsd-8403628343d4cfbc2702861d365174698d0d3dca.tar.xz
wireguard-openbsd-8403628343d4cfbc2702861d365174698d0d3dca.zip
"make ksh vi mode handle werase more like vi. It's really irritating to
have whole paths go away on ^W instead of just the last bit." "That looks right to me" millert@, "YES kthx bye!" thib@
-rw-r--r--bin/ksh/vi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/ksh/vi.c b/bin/ksh/vi.c
index e815a1cd868..321def17b14 100644
--- a/bin/ksh/vi.c
+++ b/bin/ksh/vi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vi.c,v 1.23 2006/04/10 14:38:59 jaredy Exp $ */
+/* $OpenBSD: vi.c,v 1.24 2009/06/04 04:03:22 merdely Exp $ */
/*
* vi command editing
@@ -416,9 +416,9 @@ vi_hook(int ch)
int i;
int n = srchlen;
- while (n > 0 && isspace(locpat[n - 1]))
+ while (n > 0 && !is_wordch(locpat[n - 1]))
n--;
- while (n > 0 && !isspace(locpat[n - 1]))
+ while (n > 0 && is_wordch(locpat[n - 1]))
n--;
for (i = srchlen; --i >= n; )
es->linelen -= char_len((unsigned char)locpat[i]);
@@ -1598,9 +1598,9 @@ Backword(int argcnt)
ncursor = es->cursor;
while (ncursor > 0 && argcnt--) {
- while (--ncursor >= 0 && isspace(es->cbuf[ncursor]))
+ while (--ncursor >= 0 && !is_wordch(es->cbuf[ncursor]))
;
- while (ncursor >= 0 && !isspace(es->cbuf[ncursor]))
+ while (ncursor >= 0 && is_wordch(es->cbuf[ncursor]))
ncursor--;
ncursor++;
}