fix substitution when replacing with &, we shouldnt check for an escape charcter. Its already been taken care of _somewhere_ else
This commit is contained in:
parent
bd9b32bc0d
commit
2410386611
@ -722,9 +722,8 @@ static void print_subst_w_backrefs(const char *line, const char *replace,
|
|||||||
* fortunately, regmatch[0] contains the indicies to the whole matched
|
* fortunately, regmatch[0] contains the indicies to the whole matched
|
||||||
* expression (kinda seems like it was designed for just such a
|
* expression (kinda seems like it was designed for just such a
|
||||||
* purpose...) */
|
* purpose...) */
|
||||||
else if (replace[i] == '&' && replace[i - 1] != '\\') {
|
else if (replace[i] == '&') {
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
for (j = regmatch[0].rm_so; j < regmatch[0].rm_eo; j++)
|
for (j = regmatch[0].rm_so; j < regmatch[0].rm_eo; j++)
|
||||||
pipeputc(line[j]);
|
pipeputc(line[j]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user