feat(live-filter): add ability to live filter out nodes in the tree (#1056)

This commit is contained in:
Kiyan
2022-05-17 10:03:49 +02:00
committed by GitHub
parent 99e32fea14
commit 6343813a35
16 changed files with 312 additions and 102 deletions

View File

@@ -14,13 +14,13 @@ local function get_padding_arrows(icon_state)
end
end
local function get_padding_indent_markers(depth, idx, tree, _, markers)
local function get_padding_indent_markers(depth, idx, nodes_number, _, markers)
local padding = ""
if depth ~= 0 then
local rdepth = depth / 2
markers[rdepth] = idx ~= #tree.nodes
markers[rdepth] = idx ~= nodes_number
for i = 1, rdepth do
if idx == #tree.nodes and i == rdepth then
if idx == nodes_number and i == rdepth then
padding = padding .. M.config.indent_markers.icons.corner
elseif markers[i] then
padding = padding .. M.config.indent_markers.icons.edge