summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfgsch <fgsch@openbsd.org>2003-08-22 18:17:10 +0000
committerfgsch <fgsch@openbsd.org>2003-08-22 18:17:10 +0000
commit75b5439c66909159d6882f68e0ea5724e3e4153d (patch)
tree65faf7b7ce602cda6161b36a7fd1499648a9ad46
parentregen (diff)
downloadwireguard-openbsd-75b5439c66909159d6882f68e0ea5724e3e4153d.tar.xz
wireguard-openbsd-75b5439c66909159d6882f68e0ea5724e3e4153d.zip
in word location, fix forward scanning so it correctly account for any
escaped char and not only spaces. for "foo (bar.a)" and "foo (bar a)", cd foo\ \(bar.<tab> will correctly expand to foo\ \(bar.a\). otto@ and pval@ ok.
-rw-r--r--bin/ksh/edit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c
index f4621ac0a48..97307266f69 100644
--- a/bin/ksh/edit.c
+++ b/bin/ksh/edit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: edit.c,v 1.17 2003/06/26 00:09:45 deraadt Exp $ */
+/* $OpenBSD: edit.c,v 1.18 2003/08/22 18:17:10 fgsch Exp $ */
/*
* Command line editing - common code
@@ -772,7 +772,7 @@ x_locate_word(buf, buflen, pos, startp, is_commandp)
;
/* Go forwards to end of word */
for (end = start; end < buflen && IS_WORDC(buf[end]); end++) {
- if (buf[end] == '\\' && (end+1) < buflen && buf[end+1] == ' ')
+ if (buf[end] == '\\' && (end+1) < buflen)
end++;
}