mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-10-02 00:41:44 +02:00
Fix handling of metafied characters in trailing whitespace on read
This commit is contained in:
parent
cf7b496dd5
commit
b72a946185
@ -1,3 +1,8 @@
|
||||
2005-04-25 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* users/8752: stripping IFS characters after reading a line
|
||||
in the read builtin wasn't sensitive to metafied characters.
|
||||
|
||||
2005-04-24 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* unposted: Src/parse.c: get rid of unused third argument of
|
||||
|
@ -4747,8 +4747,17 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func))
|
||||
}
|
||||
signal_setmask(s);
|
||||
}
|
||||
while (bptr > buf && iwsep(bptr[-1]))
|
||||
bptr--;
|
||||
while (bptr > buf) {
|
||||
if (bptr > buf + 1 && bptr[-2] == Meta) {
|
||||
if (iwsep(bptr[-1] ^ 32))
|
||||
bptr -= 2;
|
||||
else
|
||||
break;
|
||||
} else if (iwsep(bptr[-1]))
|
||||
bptr--;
|
||||
else
|
||||
break;
|
||||
}
|
||||
*bptr = '\0';
|
||||
if (resettty && SHTTY != -1)
|
||||
settyinfo(&saveti);
|
||||
|
Loading…
Reference in New Issue
Block a user