Skip to content

Commit c7b20ca

Browse files
committed
fixed highlight_modified gets replaced by highlight_opened_files
1 parent 8bf609c commit c7b20ca

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lua/nvim-tree/renderer/builder.lua

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ function Builder:configure_opened_file_highlighting(highlight_opened_files)
5454
return self
5555
end
5656

57+
function Builder:configure_modified_highlighting(highlight_modified)
58+
self.highlight_modified = highlight_modified
59+
return self
60+
end
61+
5762
function Builder:configure_icon_padding(padding)
5863
self.icon_padding = padding or " "
5964
return self
@@ -243,10 +248,10 @@ function Builder:_get_highlight_override(node, unloaded_bufnr)
243248
-- modified file
244249
local modified_highlight = modified.get_highlight(node)
245250
if modified_highlight then
246-
if self.highlight_opened_files == "all" or self.highlight_opened_files == "name" then
251+
if self.highlight_modified == "all" or self.highlight_modified == "name" then
247252
name_hl = modified_highlight
248253
end
249-
if self.highlight_opened_files == "all" or self.highlight_opened_files == "icon" then
254+
if self.highlight_modified == "all" or self.highlight_modified == "icon" then
250255
icon_hl = modified_highlight
251256
end
252257
end

lua/nvim-tree/renderer/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ function M.draw(unloaded_bufnr)
7171
:configure_special_files(M.config.special_files)
7272
:configure_picture_map(picture_map)
7373
:configure_opened_file_highlighting(M.config.highlight_opened_files)
74+
:configure_modified_highlighting(M.config.highlight_modified)
7475
:configure_icon_padding(M.config.icons.padding)
7576
:configure_git_icons_placement(M.config.icons.git_placement)
7677
:configure_modified_placement(M.config.icons.modified_placement)

0 commit comments

Comments
 (0)