From 32314fd3ee54527c3156a62c15aedd1a31c1c192 Mon Sep 17 00:00:00 2001 From: Mateusz Russak Date: Sun, 4 Aug 2024 11:19:31 +0200 Subject: [PATCH] Update lua/nvim-tree/api.lua Co-authored-by: Alexander Courtis --- lua/nvim-tree/api.lua | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/lua/nvim-tree/api.lua b/lua/nvim-tree/api.lua index df3cb1e5..89a6a2ef 100644 --- a/lua/nvim-tree/api.lua +++ b/lua/nvim-tree/api.lua @@ -264,18 +264,8 @@ Api.git.reload = wrap(actions.reloaders.reload_git) Api.events.subscribe = events.subscribe Api.events.Event = events.Event -Api.live_filter.start = wrap(function(...) - local explorer = core.get_explorer() - if explorer then - return explorer.live_filter:start_filtering(...) - end -end) -Api.live_filter.clear = wrap(function(...) - local explorer = core.get_explorer() - if explorer then - return explorer.live_filter:clear_filter(...) - end -end) +Api.live_filter.start = wrap_explorer_member("live_filter", "start_filtering") +Api.live_filter.clear = wrap_explorer_member("live_filter", "clear_filter") Api.marks.get = wrap_node(wrap_explorer_member("marks", "get_mark")) Api.marks.list = wrap_explorer_member("marks", "get_marks")