To: vim_dev@googlegroups.com Subject: Patch 8.2.3240 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3240 Problem: Lua print() does not work properly. Solution: Put back lua_pop(). Files: src/if_lua.c, src/testdir/test_lua.vim *** ../vim-8.2.3239/src/if_lua.c 2021-07-28 15:06:57.791381469 +0200 --- src/if_lua.c 2021-07-28 19:56:58.044331012 +0200 *************** *** 1737,1742 **** --- 1737,1743 ---- 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) *** ../vim-8.2.3239/src/testdir/test_lua.vim 2021-07-28 15:06:57.791381469 +0200 --- src/testdir/test_lua.vim 2021-07-28 19:55:48.624458167 +0200 *************** *** 870,877 **** " Test for dealing with strings containing newlines and null character func Test_lua_string_with_newline() ! let x = execute('lua print("Hello\nWorld")') ! call assert_equal("\nHello\nWorld", x) new lua k = vim.buffer(vim.eval('bufnr()')) lua k:insert("Hello\0World", 0) --- 870,877 ---- " Test for dealing with strings containing newlines and null character func Test_lua_string_with_newline() ! let x = execute('lua print("Hello\nWorld", 2)') ! call assert_equal("\nHello\nWorld 2", x) new lua k = vim.buffer(vim.eval('bufnr()')) lua k:insert("Hello\0World", 0) *** ../vim-8.2.3239/src/version.c 2021-07-28 21:25:45.360602797 +0200 --- src/version.c 2021-07-28 21:48:25.865107660 +0200 *************** *** 757,758 **** --- 757,760 ---- { /* Add new patch number below this line */ + /**/ + 3240, /**/ -- God made the integers; all else is the work of Man. -- Kronecker /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///