mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
eval/encode: Fix writing strings starting with NL to list
Error [found][1] by oni-link. [1]: https://github.com/neovim/neovim/pull/4131/files#r52239384
This commit is contained in:
@@ -28,8 +28,10 @@ local function filter_complex_blocks(body)
|
||||
local result = {}
|
||||
|
||||
for line in body:gmatch("[^\r\n]+") do
|
||||
if not (string.find(line, "(^)", 1, true) ~= nil or
|
||||
string.find(line, "_ISwupper", 1, true)) then
|
||||
if not (string.find(line, "(^)", 1, true) ~= nil
|
||||
or string.find(line, "_ISwupper", 1, true)
|
||||
or string.find(line, "msgpack_zone_push_finalizer")
|
||||
or string.find(line, "msgpack_unpacker_reserve_buffer")) then
|
||||
result[#result + 1] = line
|
||||
end
|
||||
end
|
||||
@@ -103,6 +105,11 @@ local function cimport(...)
|
||||
-- request a sorted version of the new lines (same relative order as the
|
||||
-- original preprocessed file) and feed that to the LuaJIT ffi
|
||||
local new_lines = new_cdefs:to_table()
|
||||
if os.getenv('NVIM_TEST_PRINT_CDEF') == '1' then
|
||||
for lnum, line in ipairs(new_lines) do
|
||||
print(lnum, line)
|
||||
end
|
||||
end
|
||||
ffi.cdef(table.concat(new_lines, "\n"))
|
||||
|
||||
return libnvim
|
||||
|
||||
Reference in New Issue
Block a user