refactor(#2826): multi instance nvim-tree.view

This commit is contained in:
Mateusz Russak
2024-08-04 13:31:11 +02:00
parent 0f2cda6ce0
commit fa051cf990
22 changed files with 390 additions and 297 deletions

View File

@@ -1,6 +1,5 @@
local core = require "nvim-tree.core"
local lib = require "nvim-tree.lib"
local view = require "nvim-tree.view"
local finders_find_file = require "nvim-tree.actions.finders.find-file"
local M = {}
@@ -41,11 +40,12 @@ function M.fn(opts)
return
end
if view.is_visible() then
local explorer = core.get_explorer()
if explorer and explorer.view:is_visible() then
-- focus
if opts.focus then
lib.set_target_win()
view.focus()
explorer.view:focus()
end
elseif opts.open then
-- open