summaryrefslogtreecommitdiff
path: root/lua/telescope/utils.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/telescope/utils.lua')
-rw-r--r--lua/telescope/utils.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua
index 030d942..b95f626 100644
--- a/lua/telescope/utils.lua
+++ b/lua/telescope/utils.lua
@@ -99,6 +99,10 @@ utils.path_shorten = (function()
]]
return function(path)
+ if not path then
+ return path
+ end
+
local c_str = ffi.new("char[?]", #path + 1)
ffi.copy(c_str, path)
return ffi.string(ffi.C.shorten_dir(c_str))