mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.3240: Lua print() does not work properly
Problem: Lua print() does not work properly. Solution: Put back lua_pop().
This commit is contained in:
@@ -1737,6 +1737,7 @@ luaV_print(lua_State *L)
|
|||||||
if (i > 1)
|
if (i > 1)
|
||||||
luaL_addchar(&b, ' '); // use space instead of tab
|
luaL_addchar(&b, ' '); // use space instead of tab
|
||||||
luaV_addlstring(&b, s, l, 0);
|
luaV_addlstring(&b, s, l, 0);
|
||||||
|
lua_pop(L, 1);
|
||||||
}
|
}
|
||||||
luaL_pushresult(&b);
|
luaL_pushresult(&b);
|
||||||
if (!got_int)
|
if (!got_int)
|
||||||
|
@@ -870,8 +870,8 @@ endfunc
|
|||||||
|
|
||||||
" Test for dealing with strings containing newlines and null character
|
" Test for dealing with strings containing newlines and null character
|
||||||
func Test_lua_string_with_newline()
|
func Test_lua_string_with_newline()
|
||||||
let x = execute('lua print("Hello\nWorld")')
|
let x = execute('lua print("Hello\nWorld", 2)')
|
||||||
call assert_equal("\nHello\nWorld", x)
|
call assert_equal("\nHello\nWorld 2", x)
|
||||||
new
|
new
|
||||||
lua k = vim.buffer(vim.eval('bufnr()'))
|
lua k = vim.buffer(vim.eval('bufnr()'))
|
||||||
lua k:insert("Hello\0World", 0)
|
lua k:insert("Hello\0World", 0)
|
||||||
|
@@ -755,6 +755,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3240,
|
||||||
/**/
|
/**/
|
||||||
3239,
|
3239,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user