diff options
author | brian <brian@FreeBSD.org> | 1998-06-27 16:10:40 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1998-06-27 16:10:40 +0000 |
commit | a2d16c69749e92b1c9f77a6574367a9a03fc34bb (patch) | |
tree | 69a15bba0358f5d889840c775bc6beb4fcd439de /lib/libedit/chared.c | |
parent | 3231ba4ceb6fd16d9e5a0bdca97a2a112de2734e (diff) | |
download | FreeBSD-src-a2d16c69749e92b1c9f77a6574367a9a03fc34bb.zip FreeBSD-src-a2d16c69749e92b1c9f77a6574367a9a03fc34bb.tar.gz |
Fixes assorted problems with the history edit functions in libedit. This
affects sh, ftp (and others?).
Submitted by: Max Euston <meuston@jmrodgers.com>
PR: 6516
Diffstat (limited to 'lib/libedit/chared.c')
-rw-r--r-- | lib/libedit/chared.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/libedit/chared.c b/lib/libedit/chared.c index dcd189c..ed6a7c7 100644 --- a/lib/libedit/chared.c +++ b/lib/libedit/chared.c @@ -153,12 +153,27 @@ ce__isword(p) /* cv__isword(): - * Return if p is part of a word according to vi + * Return type of word for p according to vi */ protected int cv__isword(p) int p; { + if (isspace((unsigned char) p)) + return 0; + if ((unsigned char) p == '_' || isalnum((unsigned char) p)) + return 1; + return 2; +} + + +/* c___isword(): + * Return if p is part of a space-delimited word (!isspace) + */ +protected int +c___isword(p) + int p; +{ return !isspace((unsigned char) p); } |