Skip to content

Commit 6029bcd

Browse files
committed
small tidies
1 parent 145d09c commit 6029bcd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lua/nvim-tree/actions/fs/copy-paste.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,14 +315,14 @@ function M.copy_absolute_path(node)
315315
copy_to_clipboard(content)
316316
end
317317

318-
---Node is cut. May also be copied.
318+
---Node is cut. Will not be copied.
319319
---@param node Node
320320
---@return boolean
321321
function M.is_cut(node)
322322
return vim.tbl_contains(clipboard.cut, node)
323323
end
324324

325-
---Node is copied. May also be cut.
325+
---Node is copied. Will not be cut.
326326
---@param node Node
327327
---@return boolean
328328
function M.is_copied(node)

lua/nvim-tree/renderer/builder.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ local icons = require "nvim-tree.renderer.components.icons"
99
---@field private index number
1010
---@field private depth number
1111
---@field private highlights table[] hl_group, line, col_start, col_end arguments for vim.api.nvim_buf_add_highlight
12-
---@field private combined_groups boolean[] combined group names
12+
---@field private combined_groups string[] combined group names
1313
---@field private lines string[] includes icons etc.
1414
---@field private markers boolean[] indent markers
1515
---@field private sign_names string[] line signs
@@ -273,7 +273,7 @@ function Builder:_create_combined_group(groups)
273273
local combined_name = self:_combined_group_name(groups)
274274

275275
-- only create if necessary
276-
if not self.combined_groups[combined_name] then
276+
if not vim.tbl_contains(self.combined_groups, combined_name) then
277277
local combined_hl = {}
278278

279279
-- build the highlight, overriding values
@@ -286,7 +286,7 @@ function Builder:_create_combined_group(groups)
286286
vim.api.nvim_set_hl_ns_fast(colors.NS_ID)
287287
vim.api.nvim_set_hl(colors.NS_ID, combined_name, combined_hl)
288288

289-
self.combined_groups[combined_name] = true
289+
table.insert(self.combined_groups, combined_name)
290290
end
291291
end
292292

0 commit comments

Comments
 (0)