diff src/misc2.c @ 15292:ba6f0f1bb9d0 v8.1.0654

patch 8.1.0654: when deleting a line text property flags are not adjusted commit https://github.com/vim/vim/commit/c1a9bc1a7284bd0e60f9bddfef6a4ee733bfc838 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 28 21:59:29 2018 +0100 patch 8.1.0654: when deleting a line text property flags are not adjusted Problem: When deleting a line text property flags are not adjusted. Solution: Adjust text property flags in preceding and following lines.
author Bram Moolenaar <Bram@vim.org>
date Fri, 28 Dec 2018 22:00:05 +0100
parents de63593896b3
children eae582bfb293
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1351,6 +1351,20 @@ vim_strnsave(char_u *string, int len)
 }
 
 /*
+ * Copy "p[len]" into allocated memory, ignoring NUL characters.
+ * Returns NULL when out of memory.
+ */
+    char_u *
+vim_memsave(char_u *p, int len)
+{
+    char_u *ret = alloc((unsigned)len);
+
+    if (ret != NULL)
+	mch_memmove(ret, p, (size_t)len);
+    return ret;
+}
+
+/*
  * Same as vim_strsave(), but any characters found in esc_chars are preceded
  * by a backslash.
  */