hotfix: displayer showing now items on windows (#515)

No longer use ffi for strdisplaywidth and utf_ptr2len on windows.
That might lead to wrong truncations on windows but its better than nothing.
This commit is contained in:
JINNOUCHI Yasushi
2021-02-09 17:32:43 +09:00
committed by GitHub
parent b3d3d93869
commit 993e383dd5

View File

@@ -203,7 +203,7 @@ function utils.get_os_command_output(cmd)
end
utils.strdisplaywidth = (function()
if jit then
if jit and pathlib.separator ~= '\\' then
local ffi = require('ffi')
ffi.cdef[[
typedef unsigned char char_u;
@@ -224,7 +224,7 @@ utils.strdisplaywidth = (function()
end)()
utils.utf_ptr2len = (function()
if jit then
if jit and pathlib.separator ~= '\\' then
local ffi = require('ffi')
ffi.cdef[[
typedef unsigned char char_u;