changeset 3000:02f5abca10ae v7.3.272

updated for version 7.3.272 Problem: ":put =list" does not add an empty line for a trailing empty item. Solution: Add a trailing NL when turning a list into a string.
author Bram Moolenaar <bram@vim.org>
date Wed, 10 Aug 2011 12:38:08 +0200
parents 969b13e02b64
children f6729327ecaf
files src/eval.c src/version.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -1357,7 +1357,11 @@ eval_to_string(arg, nextcmd, convert)
 	{
 	    ga_init2(&ga, (int)sizeof(char), 80);
 	    if (tv.vval.v_list != NULL)
+	    {
 		list_join(&ga, tv.vval.v_list, (char_u *)"\n", TRUE, 0);
+		if (tv.vval.v_list->lv_len > 0)
+		    ga_append(&ga, NL);
+	    }
 	    ga_append(&ga, NUL);
 	    retval = (char_u *)ga.ga_data;
 	}
--- a/src/version.c
+++ b/src/version.c
@@ -710,6 +710,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    272,
+/**/
     271,
 /**/
     270,