revert(#3180, #3177): invalid group or tabpage (#3181)

* Revert "feat(#2826): allow only one window with nvim-tree buffer per tab (#3174)"

This reverts commit dd2364d680.

* Revert "refactor(#2826): View tracks winids and bufnrs via events, unused for now (#3170)"

This reverts commit 65bae44922.

* Revert "refactor(#2826): remove view debug/cc, enable new codepaths for get_winid and get_bufnr (#3169)"

This reverts commit a9156c0139.
This commit is contained in:
Alexander Courtis
2025-08-10 11:18:31 +10:00
committed by GitHub
parent dd2364d680
commit 9b289abd69
16 changed files with 439 additions and 261 deletions

View File

@@ -15,7 +15,7 @@ function M.set_target_win()
local id = vim.api.nvim_get_current_win()
if explorer and id == explorer.view:get_winid() then
if explorer and id == explorer.view:get_winnr(nil, "lib.set_target_win") then
M.target_winid = 0
return
end
@@ -102,14 +102,14 @@ function M.open(opts)
M.set_target_win()
if not core.get_explorer() or opts.path then
if opts.path then
core.init(opts.path)
core.init(opts.path, "lib.open - opts.path")
else
local cwd, err = vim.loop.cwd()
if not cwd then
notify.error(string.format("current working directory unavailable: %s", err))
return
end
core.init(cwd)
core.init(cwd, "lib.open - cwd")
end
end
@@ -136,7 +136,7 @@ function M.open(opts)
end
if explorer then
explorer.view:restore_state()
explorer.view:restore_tab_state()
end
end