Merge pull request #238 from ptillemans/fix_win_paths

normalize filename using vim.fs
This commit is contained in:
ThePrimeagen 2023-01-23 10:17:07 -07:00 committed by GitHub
commit 8c0bb0a328
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -173,10 +173,7 @@ function M.nav_file(id)
end
local mark = Marked.get_marked_file(idx)
local filename = mark.filename
if filename:sub(1, 1) ~= "/" then
filename = vim.loop.cwd() .. "/" .. mark.filename
end
local filename = vim.fs.normalize(mark.filename)
local buf_id = get_or_create_buffer(filename)
local set_row = not vim.api.nvim_buf_is_loaded(buf_id)