From: Bram Moolenaar Date: Fri, 21 May 2010 11:08:58 +0000 (+0200) Subject: updated for version 7.2.437 X-Git-Tag: v7.2.437 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6dc79f28902af22de6097e66a482e0c67d829395;p=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. --- diff --git a/src/regexp.c b/src/regexp.c index 216bf3a18..53559455e 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -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; } } diff --git a/src/version.c b/src/version.c index 103e043dc..7a0642a22 100644 --- a/src/version.c +++ b/src/version.c @@ -681,6 +681,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 437, /**/ 436, /**/