diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-05-04 20:19:21 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-05-04 20:19:21 +0200 |
commit | 659c94d483b2fdad949c14a42cee96f99a66394b (patch) | |
tree | c3d9f85f83f8476ad40abf22ae746dd0f3d173b5 | |
parent | 7bc25aed33934f4281b321fce2f736d47d6defdf (diff) | |
download | vim-git-659c94d483b2fdad949c14a42cee96f99a66394b.tar.gz |
patch 7.4.725v7.4.725
Problem: ":call setreg('"', [])" reports an internal error.
Solution: Make the register empty. (Yasuhiro Matsumoto)
-rw-r--r-- | src/ops.c | 8 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 10 insertions, 0 deletions
@@ -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. diff --git a/src/version.c b/src/version.c index ba5f30e29..822da6232 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 725, +/**/ 724, /**/ 723, |