Skip to content

Commit 3b41f0d

Browse files
authored
fix: prevent error caused by not using all built-in sources (#669)
fixes #664
1 parent a9f2140 commit 3b41f0d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lua/neo-tree/setup/init.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ M.buffer_enter_event = function()
111111
]])
112112

113113
local winhighlight =
114-
"Normal:NeoTreeNormal,NormalNC:NeoTreeNormalNC,SignColumn:NeoTreeSignColumn,CursorLine:NeoTreeCursorLine,FloatBorder:NeoTreeFloatBorder,StatusLine:NeoTreeStatusLine,StatusLineNC:NeoTreeStatusLineNC,VertSplit:NeoTreeVertSplit,EndOfBuffer:NeoTreeEndOfBuffer"
114+
"Normal:NeoTreeNormal,NormalNC:NeoTreeNormalNC,SignColumn:NeoTreeSignColumn,CursorLine:NeoTreeCursorLine,FloatBorder:NeoTreeFloatBorder,StatusLine:NeoTreeStatusLine,StatusLineNC:NeoTreeStatusLineNC,VertSplit:NeoTreeVertSplit,EndOfBuffer:NeoTreeEndOfBuffer"
115115
if vim.version().minor >= 7 then
116116
vim.cmd("setlocal winhighlight=" .. winhighlight .. ",WinSeparator:NeoTreeWinSeparator")
117117
else
@@ -208,7 +208,7 @@ M.win_enter_event = function()
208208
end
209209

210210
-- if the new win is not a floating window, make sure all neo-tree floats are closed
211-
require("neo-tree").close_all("float")
211+
manager.close_all("float")
212212

213213
if M.config.close_if_last_window then
214214
local tabnr = vim.api.nvim_get_current_tabpage()
@@ -487,10 +487,10 @@ M.merge_config = function(user_config, is_auto_config)
487487
for source_name, mod_root in pairs(all_sources) do
488488
local module = require(mod_root)
489489
default_config[source_name] = default_config[source_name]
490-
or {
491-
renderers = {},
492-
components = {},
493-
}
490+
or {
491+
renderers = {},
492+
components = {},
493+
}
494494
local source_default_config = default_config[source_name]
495495
source_default_config.components = module.components or require(mod_root .. ".components")
496496
source_default_config.commands = module.commands or require(mod_root .. ".commands")

0 commit comments

Comments
 (0)