fix: directory rendering with custom highlights (#551)

These would loose their trailing '/', making them unusable
This commit is contained in:
Ian Wright 2025-01-07 00:11:10 -05:00 committed by GitHub
parent b082ad5eb9
commit a6a4f48b14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -770,6 +770,10 @@ M.format_entry_cols = function(entry, column_defs, col_width, adapter, is_hidden
else
local hl = get_custom_hl(external_entry, is_hidden, false, false)
if hl then
-- Add the trailing / if this is a directory, this is important
if entry_type == "directory" then
name = name .. "/"
end
table.insert(cols, { name, hl })
return cols
end