diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-08-22 18:17:11 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-08-22 18:17:11 +0000 |
commit | 079441f5c278bcf639beee6b06835b28b4ff21bb (patch) | |
tree | f8531dc2b0bec673837e7e63609aeedee23c8277 /bin | |
parent | f8f7fe53add6b0430b8c383629339da4b6dc7edf (diff) |
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.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ksh/edit.c | 4 |
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++; } |