borissov / fugitive-gitea

☕ Plugin for :Gbrowse to work with GITea server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not sure if it's my environment or a bug, but I had to make the below changes to get this to work...

todmorrison opened this issue · comments

Without the below changes, GBrowse goes to the wrong URL and, when that is fixed, doesn't handle ranges correctly:

@ -48,9 +48,10 @@ function! s:giteaserver_url(opts, ...) abort
if get(a:opts, 'type', '') ==# 'tree' || a:opts.path =# '/$'
return ''
elseif get(a:opts, 'type', '') ==# 'blob' || a:opts.path =
# '[^/]$'

  • let url = root . '/src/commit/'.commit.'/'.path
    +" let url = root . '/src/commit/'.commit.'/'.path
  • let url = root . '/src/'.commit.'/'.path
    if get(a:opts, 'line1')
  •  let url .= '\#L' . a:opts.line1
    
  •  let url .= '#L' . a:opts.line1
     if get(a:opts, 'line2') != get(a:opts, 'line1')
       let url .= '-L' . a:opts.line2
     endif
    

Hi and thank you! Can you make pull request and I will merge.