Skip to content

Commit d73859f

Browse files
authored
fix: restore ability to have separate trees for each tab (#1056)
fixes #1053
1 parent 78d2616 commit d73859f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lua/neo-tree/ui/windows.lua

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
local locations = {}
22

33
local get_location = function(location)
4-
local loc = locations[location]
4+
local tab = vim.api.nvim_get_current_tabpage()
5+
if not locations[tab] then
6+
locations[tab] = {}
7+
end
8+
local loc = locations[tab][location]
59
if loc then
610
if loc.winid ~= 0 then
711
-- verify the window before we return it
@@ -16,9 +20,8 @@ local get_location = function(location)
1620
name = location,
1721
winid = 0,
1822
}
19-
locations[location] = loc
23+
locations[tab][location] = loc
2024
return loc
2125
end
2226

23-
local M = { get_location = get_location }
24-
return M
27+
return { get_location = get_location }

0 commit comments

Comments
 (0)