From OpenBSD:

revision 1.18
date: 2003/08/22 18:17:10;  author: fgsch;  state: Exp;  lines: +2 -2
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.
This commit is contained in:
wiz 2003-08-26 07:28:39 +00:00
parent 80d20cd1d2
commit ad30231fc4
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: edit.c,v 1.11 2003/06/23 11:38:54 agc Exp $ */
/* $NetBSD: edit.c,v 1.12 2003/08/26 07:28:39 wiz Exp $ */
/*
* Command line editing - common code
@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: edit.c,v 1.11 2003/06/23 11:38:54 agc Exp $");
__RCSID("$NetBSD: edit.c,v 1.12 2003/08/26 07:28:39 wiz Exp $");
#endif
@ -777,7 +777,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++;
}