summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/if_lua.c4
-rw-r--r--src/testdir/test_lua.vim18
-rw-r--r--src/version.c2
3 files changed, 22 insertions, 2 deletions
diff --git a/src/if_lua.c b/src/if_lua.c
index 82dffb0baf..79fb68168b 100644
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -1734,9 +1734,9 @@ luaV_print(lua_State *L)
s = lua_tolstring(L, -1, &l);
if (s == NULL)
return luaL_error(L, "cannot convert to string");
- if (i > 1) luaL_addchar(&b, ' '); // use space instead of tab
+ if (i > 1)
+ luaL_addchar(&b, ' '); // use space instead of tab
luaV_addlstring(&b, s, l, 0);
- lua_pop(L, 1);
}
luaL_pushresult(&b);
if (!got_int)
diff --git a/src/testdir/test_lua.vim b/src/testdir/test_lua.vim
index c330563190..2f204048f6 100644
--- a/src/testdir/test_lua.vim
+++ b/src/testdir/test_lua.vim
@@ -850,6 +850,24 @@ func Test_luafile_error()
bwipe!
endfunc
+" Test :luafile printing a long string
+func Test_luafile_print()
+ new Xlua_file
+ let lines =<< trim END
+ local data = ''
+ for i = 1, 130 do
+ data = data .. 'xxxxx asd as as dad sad sad xz cxz czxcxzczxc ad ad asd asd asd asd asd'
+ end
+ print(data)
+ END
+ call setline(1, lines)
+ w
+ luafile %
+
+ call delete('Xlua_file')
+ bwipe!
+endfunc
+
" Test for dealing with strings containing newlines and null character
func Test_lua_string_with_newline()
let x = execute('lua print("Hello\nWorld")')
diff --git a/src/version.c b/src/version.c
index b17233398a..fa54081cae 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3234,
+/**/
3233,
/**/
3232,