Skip to content

Commit

Permalink
normalize filename using vim.fs
Browse files Browse the repository at this point in the history
  • Loading branch information
ptillemans committed Dec 1, 2022
1 parent 21d0d1b commit e4a91c4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lua/harpoon/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit e4a91c4

Please sign in to comment.