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