fix: truncate for builtin.buffers

fix #2022
This commit is contained in:
Simon Hauser
2022-06-30 14:29:46 +02:00
parent 4ef490defa
commit 1ba967f84e
2 changed files with 6 additions and 2 deletions

View File

@@ -276,7 +276,10 @@ utils.transform_path = function(opts, path)
if opts.__length == nil then
opts.__length = calc_result_length(path_display.truncate)
end
transformed_path = truncate(transformed_path, opts.__length, nil, -1)
if opts.__prefix == nil then
opts.__prefix = 0
end
transformed_path = truncate(transformed_path, opts.__length - opts.__prefix, nil, -1)
end
end