Skip to content

Commit

Permalink
Fix(git_status): respect dir parameter passed into command (#1499)
Browse files Browse the repository at this point in the history
Co-authored-by: pynappo <[email protected]>
  • Loading branch information
konosubakonoakua and pynappo authored Dec 31, 2024
1 parent a9f8943 commit 2a0b2c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lua/neo-tree/sources/git_status/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ end
---Navigate to the given path.
---@param path string Path to navigate to. If empty, will navigate to the cwd.
M.navigate = function(state, path, path_to_reveal, callback, async)
state.path = path or state.path
state.dirty = false
if path_to_reveal then
renderer.position.set(state, path_to_reveal)
Expand Down
2 changes: 1 addition & 1 deletion lua/neo-tree/sources/git_status/lib/items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ M.get_git_status = function(state)
return
end
state.loading = true
local status_lookup, project_root = git.status(state.git_base, true)
local status_lookup, project_root = git.status(state.git_base, true, state.path)
state.path = project_root or state.path or vim.fn.getcwd()
local context = file_items.create_context()
context.state = state
Expand Down

0 comments on commit 2a0b2c5

Please sign in to comment.