From 079441f5c278bcf639beee6b06835b28b4ff21bb Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Fri, 22 Aug 2003 18:17:11 +0000 Subject: 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. will correctly expand to foo\ \(bar.a\). otto@ and pval@ ok. --- bin/ksh/edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') 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++; } -- cgit v1.2.3