]> granicus.if.org Git - vim/commitdiff
patch 7.4.725 v7.4.725
authorBram Moolenaar <Bram@vim.org>
Mon, 4 May 2015 18:19:21 +0000 (20:19 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 4 May 2015 18:19:21 +0000 (20:19 +0200)
Problem:    ":call setreg('"', [])" reports an internal error.
Solution:   Make the register empty. (Yasuhiro Matsumoto)

src/ops.c
src/version.c

index 856133c8e2edc25347f7cd0b93f4c363e3b249f8..090d3f8918a9c4763e8ed8a07e5f01b8be942d2e 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -6642,6 +6642,14 @@ str_to_reg(y_ptr, yank_type, str, len, blocklen, str_list)
        }
     }
 
+    /* Without any lines make the register empty. */
+    if (y_ptr->y_size + newlines == 0)
+    {
+       vim_free(y_ptr->y_array);
+       y_ptr->y_array = NULL;
+       return;
+    }
+
     /*
      * Allocate an array to hold the pointers to the new register lines.
      * If the register was not empty, move the existing lines to the new array.
index ba5f30e292f24432770dc32eef73ac1c2e50ee02..822da6232d7927bbe03787d3638948f464523b26 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    725,
 /**/
     724,
 /**/