fix: leave netrw autocmds intact when default_file_explorer = false (#135)

This commit is contained in:
David Attlee 2023-06-29 12:48:36 -04:00 committed by GitHub
parent 0138a2e0f9
commit 789b486fb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -815,7 +815,8 @@ M.setup = function(opts)
M[method](unpack(args.fargs))
end, { desc = "Open oil file browser on a directory", nargs = "*", complete = "dir" })
local aug = vim.api.nvim_create_augroup("Oil", {})
if vim.fn.exists("#FileExplorer") then
if config.default_file_explorer and vim.fn.exists("#FileExplorer") then
vim.api.nvim_create_augroup("FileExplorer", { clear = true })
end