diff options
| author | Simon Hauser <simon.hauser@helsinki-systems.de> | 2022-06-30 14:29:46 +0200 |
|---|---|---|
| committer | Simon Hauser <simon.hauser@helsinki-systems.de> | 2022-06-30 14:29:57 +0200 |
| commit | 1ba967f84e8416de9a3423bd693ec77744df8bff (patch) | |
| tree | f3a0db20736d26a03e48622148a175d8cee29182 /lua/telescope/utils.lua | |
| parent | 4ef490defaca6343bd6e5c24f20ba8da50e66341 (diff) | |
fix: truncate for builtin.buffers
fix #2022
Diffstat (limited to 'lua/telescope/utils.lua')
| -rw-r--r-- | lua/telescope/utils.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua index 07800b2..356d102 100644 --- a/lua/telescope/utils.lua +++ b/lua/telescope/utils.lua @@ -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 |
