fix: do not open exec open file if there is no active buffer

This commit is contained in:
Ali Almohaya 2022-09-26 23:57:02 +03:00
parent 52a0828d77
commit 60015c1736
No known key found for this signature in database
GPG key ID: 4B80BC43FC6007E0

View file

@ -26,6 +26,12 @@ function M.openFile()
end
local file_path = utils.get_current_relative_file_path()
if file_path:len() == 0 then
print("There is no active file to open!")
return
end
local current_branch_name = utils.get_current_branch()
local file_page_url = M.repo_url .. "/blob/" .. current_branch_name .. file_path