summaryrefslogtreecommitdiff
path: root/lua/telescope/utils.lua
diff options
context:
space:
mode:
authorJINNOUCHI Yasushi <me@delphinus.dev>2021-02-09 17:32:43 +0900
committerGitHub <noreply@github.com>2021-02-09 09:32:43 +0100
commit993e383dd5356bf10c5cf2b5d0ac88f9c7746181 (patch)
tree19cd9f3654d58771f881a28f33b4d86e509e4bd8 /lua/telescope/utils.lua
parentb3d3d938696a533c199031418e0da553a8424a46 (diff)
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.
Diffstat (limited to 'lua/telescope/utils.lua')
-rw-r--r--lua/telescope/utils.lua4
1 files 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;