feat(view): add float.quit_on_focus_loss, float respects actions.open_file.quit_on_open (#1621)
This commit is contained in:
@@ -267,7 +267,7 @@ function M.fn(mode, filename)
|
||||
end
|
||||
|
||||
function M.setup(opts)
|
||||
M.quit_on_open = opts.actions.open_file.quit_on_open or opts.view.float.enable
|
||||
M.quit_on_open = opts.actions.open_file.quit_on_open
|
||||
M.resize_window = opts.actions.open_file.resize_window
|
||||
if opts.actions.open_file.window_picker.chars then
|
||||
opts.actions.open_file.window_picker.chars = tostring(opts.actions.open_file.window_picker.chars):upper()
|
||||
|
||||
@@ -25,7 +25,7 @@ local overlay_bufnr = nil
|
||||
local overlay_winnr = nil
|
||||
|
||||
local function remove_overlay()
|
||||
if view.View.float.enable then
|
||||
if view.View.float.enable and view.View.float.quit_on_focus_loss then
|
||||
-- return to normal nvim-tree float behaviour when filter window is closed
|
||||
a.nvim_create_autocmd("WinLeave", {
|
||||
pattern = "NvimTree_*",
|
||||
|
||||
Reference in New Issue
Block a user