# HG changeset patch # User Bram Moolenaar # Date 1274440138 -7200 # Node ID dde812fb22478c1fbd34d935ec466b2cd9869da4 # Parent f7579a31705cfca0c8eb120915b6940c05086db1 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 --- a/src/regexp.c +++ b/src/regexp.c @@ -6974,6 +6974,13 @@ vim_regsub_both(source, dest, copy, magi 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; } }