summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2010-05-21 13:08:58 +0200
committerBram Moolenaar <bram@vim.org>2010-05-21 13:08:58 +0200
commitdfbf21e330f59962b5e897cf929af25b8e121296 (patch)
tree6fa6e117bc8c1b63a81067068360efd95f354b68
parentcbda4dabb41a4e59ba9110fdac37c69355a60873 (diff)
downloadvim-dfbf21e330f59962b5e897cf929af25b8e121296.tar.gz
updated for version 7.2.437v7.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.
-rw-r--r--src/regexp.c7
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/regexp.c b/src/regexp.c
index 216bf3a1..53559455 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 103e043d..7a0642a2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -682,6 +682,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 437,
+/**/
436,
/**/
435,