mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.2.437
Problem: When "\\\n" appears in the expression result the \n doesn't result in a line break. (Andy Wokula) Solution: Also replace a \n after a backslash into \r.
This commit is contained in:
parent
7a329911b9
commit
6019078ece
@ -6974,6 +6974,13 @@ vim_regsub_both(source, dest, copy, magic, backslash)
|
|||||||
else if (*s == '\\' && s[1] != NUL)
|
else if (*s == '\\' && s[1] != NUL)
|
||||||
{
|
{
|
||||||
++s;
|
++s;
|
||||||
|
/* Change NL to CR here too, so that this works:
|
||||||
|
* :s/abc\\\ndef/\="aaa\\\nbbb"/ on text:
|
||||||
|
* abc\
|
||||||
|
* def
|
||||||
|
*/
|
||||||
|
if (*s == NL)
|
||||||
|
*s = CAR;
|
||||||
had_backslash = TRUE;
|
had_backslash = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user