fix: use relative path (#875)

This commit is contained in:
yetone 2024-11-19 23:52:53 +08:00 committed by GitHub
parent d17905a1c8
commit 5dd42548d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1345,7 +1345,7 @@ function Sidebar:create_input(opts)
local filetype = api.nvim_get_option_value("filetype", { buf = self.code.bufnr }) local filetype = api.nvim_get_option_value("filetype", { buf = self.code.bufnr })
local selected_file = { local selected_file = {
filepath = api.nvim_buf_get_name(self.code.bufnr), filepath = Utils.relative_path(api.nvim_buf_get_name(self.code.bufnr)),
} }
local selected_code = nil local selected_code = nil