* Revert "fix(#3172): live filter exception (#3173)" This reverts commit0a7fcdf3f8. * Revert "refactor(#2826): move view to instanced window class (#3153)" This reverts commit0a06f65bf0. * feat(#3157): add view.cursorlineopt
This commit is contained in:
committed by
GitHub
parent
9b289abd69
commit
a4699c0904
@@ -1,5 +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 = {}
|
||||
@@ -10,8 +10,6 @@ local M = {}
|
||||
---@param cwd boolean|nil legacy -> opts.path
|
||||
---@param bang boolean|nil legacy -> opts.update_root
|
||||
function M.fn(opts, no_focus, cwd, bang)
|
||||
local explorer = core.get_explorer()
|
||||
|
||||
-- legacy arguments
|
||||
if type(opts) == "boolean" then
|
||||
opts = {
|
||||
@@ -42,9 +40,9 @@ function M.fn(opts, no_focus, cwd, bang)
|
||||
opts.path = nil
|
||||
end
|
||||
|
||||
if explorer and explorer.view:is_visible() then
|
||||
if view.is_visible() then
|
||||
-- close
|
||||
explorer.view:close(nil, "toggle.fn")
|
||||
view.close()
|
||||
else
|
||||
-- open
|
||||
lib.open({
|
||||
|
||||
Reference in New Issue
Block a user