Skip to content

Commit ce0cd70

Browse files
authored
fix(git): parse ignored statuses correctly (#1944)
1 parent 144a979 commit ce0cd70

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lua/neo-tree/git/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ M._parse_porcelain = function(
357357
end
358358
end
359359

360-
while line and line:sub(1, 1) == IGNORED_BYTE do
360+
while line and line:byte(1, 1) == IGNORED_BYTE do
361361
local abspath = git_root_dir .. trim_trailing_slash(line:sub(path_start))
362362
if utils.is_windows then
363363
abspath = utils.windowize_path(abspath)

lua/neo-tree/sources/filesystem/lib/fs_scan.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,15 @@ local should_check_gitignore = function(state)
128128
end
129129
end
130130
---@param context neotree.sources.filesystem.Context
131-
local job_complete = function(context, async)
131+
---@param skip_render_context boolean?
132+
local job_complete = function(context, skip_render_context)
132133
local state = context.state
133134
file_nesting.nest_items(context)
134135
ignored.mark_ignored(state, context.all_items)
135136
if should_check_gitignore(state) then
136137
git.mark_gitignored(state, context.all_items)
137138
end
138-
if not async then
139+
if not skip_render_context then
139140
vim.schedule(function()
140141
render_context(context)
141142
end)

0 commit comments

Comments
 (0)