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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202107281949.16SJnU2m1953466%40masaka.moolenaar.net.

Raspunde prin e-mail lui