Add missing aborts

This commit is contained in:
Tim Pope
2014-07-18 17:48:43 -04:00
parent 3772a98b3a
commit 3b4c1ae342

View File

@@ -32,7 +32,7 @@ function! s:shellesc(arg) abort
endif endif
endfunction endfunction
function! s:repo_name() function! s:repo_name() abort
if !exists('b:github_repo') if !exists('b:github_repo')
let repo = fugitive#buffer().repo() let repo = fugitive#buffer().repo()
let url = repo.config('remote.origin.url') let url = repo.config('remote.origin.url')
@@ -47,7 +47,7 @@ endfunction
" }}}1 " }}}1
" HTTP {{{1 " HTTP {{{1
function! s:credentials() function! s:credentials() abort
if !exists('g:github_user') if !exists('g:github_user')
let g:github_user = $GITHUB_USER let g:github_user = $GITHUB_USER
if g:github_user ==# '' if g:github_user ==# ''
@@ -137,14 +137,14 @@ function! rhubarb#request(path, ...) abort
endif endif
endfunction endfunction
function! rhubarb#repo_request(...) function! rhubarb#repo_request(...) abort
return rhubarb#request('/repos/' . s:repo_name() . (a:0 && a:1 !=# '' ? '/' . a:1 : ''), a:0 > 1 ? a:2 : {}) return rhubarb#request('/repos/' . s:repo_name() . (a:0 && a:1 !=# '' ? '/' . a:1 : ''), a:0 > 1 ? a:2 : {})
endfunction endfunction
" }}}1 " }}}1
" Issues {{{1 " Issues {{{1
function! rhubarb#omnifunc(findstart,base) function! rhubarb#omnifunc(findstart,base) abort
if a:findstart if a:findstart
let existing = matchstr(getline('.')[0:col('.')-1],'#\d*$\|@[[:alnum:]-]*$') let existing = matchstr(getline('.')[0:col('.')-1],'#\d*$\|@[[:alnum:]-]*$')
return col('.')-1-strlen(existing) return col('.')-1-strlen(existing)