Skip to content

Commit 0fcd126

Browse files
authored
perf(view): avoid running is_hidden_file when show_hidden is set (#471)
1 parent 4f3c678 commit 0fcd126

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/oil/view.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ local last_cursor_entry = {}
2222
---@return boolean
2323
M.should_display = function(name, bufnr)
2424
return not config.view_options.is_always_hidden(name, bufnr)
25-
and (not config.view_options.is_hidden_file(name, bufnr) or config.view_options.show_hidden)
25+
and (config.view_options.show_hidden or not config.view_options.is_hidden_file(name, bufnr))
2626
end
2727

2828
---@param bufname string

0 commit comments

Comments
 (0)