mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-13 17:40:25 +00:00
normalize filename using vim.fs
This commit is contained in:
parent
21d0d1bfa3
commit
e4a91c481b
@ -173,10 +173,7 @@ function M.nav_file(id)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local mark = Marked.get_marked_file(idx)
|
local mark = Marked.get_marked_file(idx)
|
||||||
local filename = mark.filename
|
local filename = vim.fs.normalize(mark.filename)
|
||||||
if filename:sub(1, 1) ~= "/" then
|
|
||||||
filename = vim.loop.cwd() .. "/" .. mark.filename
|
|
||||||
end
|
|
||||||
local buf_id = get_or_create_buffer(filename)
|
local buf_id = get_or_create_buffer(filename)
|
||||||
local set_row = not vim.api.nvim_buf_is_loaded(buf_id)
|
local set_row = not vim.api.nvim_buf_is_loaded(buf_id)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user