feat: support OpenInGHFileLines command

This commit is contained in:
Ali Almohaya 2023-05-26 22:31:02 +03:00
parent 374c081409
commit b9daa9db78
No known key found for this signature in database
GPG key ID: 4B80BC43FC6007E0
3 changed files with 19 additions and 2 deletions

View file

@ -45,6 +45,10 @@ function M.open_file(
local file_page_url = M.repo_url .. "/blob/" .. utils.get_current_branch_or_commit() .. file_path
if range_start and not range_end then
file_page_url = file_page_url .. "#L" .. range_start
end
if range_start and range_end then
file_page_url = file_page_url .. "#L" .. range_start .. "-L" .. range_end
end