From 993e383dd5356bf10c5cf2b5d0ac88f9c7746181 Mon Sep 17 00:00:00 2001 From: JINNOUCHI Yasushi Date: Tue, 9 Feb 2021 17:32:43 +0900 Subject: [PATCH] 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. --- lua/telescope/utils.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua index 9cfc23c..188c1ea 100644 --- a/lua/telescope/utils.lua +++ b/lua/telescope/utils.lua @@ -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;