diff --git a/lua/nvim-tree/git/runner.lua b/lua/nvim-tree/git/runner.lua index 0c2d7726..45830bdd 100644 --- a/lua/nvim-tree/git/runner.lua +++ b/lua/nvim-tree/git/runner.lua @@ -8,6 +8,10 @@ function Runner:_parse_status_output(line) local status = line:sub(1, 2) -- removing `"` when git is returning special file status containing spaces local path = line:sub(4, -2):gsub('^"', ''):gsub('"$', '') + -- replacing slashes if on windows + if vim.fn.has('win32') == 1 then + path = path:gsub('/', '\\') + end if #status > 0 and #path > 0 then self.output[utils.path_remove_trailing(utils.path_join({self.project_root,path}))] = status end