Skip to content

Commit

Permalink
Fix an issue with directories with custom highlights
Browse files Browse the repository at this point in the history
These would loose their trailing '/', making them unusable
  • Loading branch information
Landaman committed Jan 6, 2025
1 parent c12fad2 commit 708e864
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/oil/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 708e864

Please sign in to comment.