# HG changeset patch # User Bram Moolenaar # Date 1430763561 -7200 # Node ID 399216850e36de4c7826e2b02a9a0cca10ea54c4 # Parent 0d413bf8e28817bce68c6d8b53b526fae4d0309b patch 7.4.725 Problem: ":call setreg('"', [])" reports an internal error. Solution: Make the register empty. (Yasuhiro Matsumoto) diff --git a/src/ops.c b/src/ops.c --- a/src/ops.c +++ b/src/ops.c @@ -6642,6 +6642,14 @@ str_to_reg(y_ptr, yank_type, str, len, b } } + /* 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 --- 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,