We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
:edit .
1 parent 2298b63 commit f92b7e7Copy full SHA for f92b7e7
lua/nvim-tree.lua
@@ -301,13 +301,14 @@ function M.open_on_directory()
301
end
302
local buf = api.nvim_get_current_buf()
303
local bufname = api.nvim_buf_get_name(buf)
304
- if vim.fn.isdirectory(bufname) ~= 1 or bufname == lib.Tree.cwd then
+ if vim.fn.isdirectory(bufname) ~= 1 then
305
return
306
307
308
view.close()
309
-
310
- lib.change_dir(bufname)
+ if bufname ~= lib.Tree.cwd then
+ lib.change_dir(bufname)
311
+ end
312
M.hijack_current_window()
313
314
view.open()
0 commit comments