Extract has_repo_path() function

This commit is contained in:
Andy Stewart
2020-02-24 15:16:51 +00:00
parent 669357bb92
commit 8e368ae8d1
2 changed files with 5 additions and 7 deletions

View File

@@ -1,5 +1,3 @@
let s:t_string = type('')
" Primary functions {{{
function! gitgutter#all(force) abort
@@ -156,11 +154,7 @@ function! gitgutter#setup_maps()
endfunction
function! s:setup_path(bufnr, continuation)
let p = gitgutter#utility#repo_path(a:bufnr, 0)
if type(p) == s:t_string && !empty(p) " if path is known
return
endif
if gitgutter#utility#has_repo_path(a:bufnr) | return | endif
return gitgutter#utility#set_repo_path(a:bufnr, a:continuation)
endfunction