We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e86dc9b commit 6647212Copy full SHA for 6647212
1 file changed
lua/plenary/path.lua
@@ -397,7 +397,7 @@ local shorten = (function()
397
local ffi = require "ffi"
398
ffi.cdef [[
399
typedef unsigned char char_u;
400
- char_u *shorten_dir(char_u *str);
+ void shorten_dir(char_u *str);
401
]]
402
return function(filename)
403
if not filename or is_uri(filename) then
@@ -406,7 +406,8 @@ local shorten = (function()
406
407
local c_str = ffi.new("char[?]", #filename + 1)
408
ffi.copy(c_str, filename)
409
- return ffi.string(ffi.C.shorten_dir(c_str))
+ ffi.C.shorten_dir(c_str)
410
+ return ffi.string(c_str)
411
end
412
413
0 commit comments