feat(view): add float.quit_on_focus_loss, float respects actions.open_file.quit_on_open (#1621)

This commit is contained in:
emmanueltouzery
2022-10-08 05:35:20 +02:00
committed by GitHub
parent be2b4f58e6
commit 79f631bc1d
4 changed files with 9 additions and 4 deletions

View File

@@ -412,7 +412,7 @@ local function setup_autocommands(opts)
})
end
if opts.view.float.enable then
if opts.view.float.enable and opts.view.float.quit_on_focus_loss then
create_nvim_tree_autocmd("WinLeave", { pattern = "NvimTree_*", callback = view.close })
end
end
@@ -457,6 +457,7 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
},
float = {
enable = false,
quit_on_focus_loss = true,
open_win_config = {
relative = "editor",
border = "rounded",