diff options
author | Wayne Davison <wayned@users.sourceforge.net> | 2006-02-13 11:06:21 +0000 |
---|---|---|
committer | Wayne Davison <wayned@users.sourceforge.net> | 2006-02-13 11:06:21 +0000 |
commit | 5c8bb4944d669065a0ee5ede7e375b24553ad18b (patch) | |
tree | 4b2e93c41dcb3c0ce3306b726e74269f5d2a6279 | |
parent | a6658fb9f6c4be686d1cdf356d713c2382912ea1 (diff) | |
download | zsh-5c8bb4944d669065a0ee5ede7e375b24553ad18b.tar.gz zsh-5c8bb4944d669065a0ee5ede7e375b24553ad18b.tar.xz zsh-5c8bb4944d669065a0ee5ede7e375b24553ad18b.zip |
Replaced a flawed look-behind algorithm for backslash detection
with one that looks forward (avoiding an accidental quoting of a char after a "\\" sequence).
-rw-r--r-- | Src/Zle/computil.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c index 8c1fa0800..6bc02e36d 100644 --- a/Src/Zle/computil.c +++ b/Src/Zle/computil.c @@ -3671,14 +3671,14 @@ bin_comptry(char *nam, char **args, UNUSED(Options ops), UNUSED(int func)) qqq = qq = dupstring(q); while (*qqq) { - if (qqq == qq || qqq[-1] != '\\') { - if (*qqq == '{') - *qqq = Inbrace; - else if (*qqq == '}') - *qqq = Outbrace; - else if (*qqq == ',') - *qqq = Comma; - } + if (*qqq == '\\' && qqq[1]) + qqq++; + else if (*qqq == '{') + *qqq = Inbrace; + else if (*qqq == '}') + *qqq = Outbrace; + else if (*qqq == ',') + *qqq = Comma; qqq++; } tokenize(qq); |