1
0
forked from aniani/vim

patch 7.4.725

Problem:    ":call setreg('"', [])" reports an internal error.
Solution:   Make the register empty. (Yasuhiro Matsumoto)
This commit is contained in:
Bram Moolenaar
2015-05-04 20:19:21 +02:00
parent 7bc25aed33
commit 659c94d483
2 changed files with 10 additions and 0 deletions

View File

@@ -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.