1
0
forked from aniani/vim

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:
Bram Moolenaar 2010-05-21 13:08:58 +02:00
parent 7a329911b9
commit 6019078ece

View File

@ -6974,6 +6974,13 @@ vim_regsub_both(source, dest, copy, magic, backslash)
else if (*s == '\\' && s[1] != NUL)
{
++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;
}
}