@@ -20,7 +20,7 @@ end
|
||||
---@deprecated
|
||||
M.on_keypress = require'nvim-tree.actions'.on_keypress
|
||||
|
||||
function M.toggle(find_file)
|
||||
function M.toggle(find_file, no_focus)
|
||||
if view.is_visible() then
|
||||
view.close()
|
||||
else
|
||||
@@ -28,6 +28,9 @@ function M.toggle(find_file)
|
||||
if TreeExplorer and (_config.update_focused_file.enable or find_file) then
|
||||
M.find_file(false)
|
||||
end
|
||||
if no_focus then
|
||||
vim.cmd "wincmd p"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user