Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8409d50

Browse files
committedSep 3, 2020
extract codeowners#whoBufname()
1 parent 6d44666 commit 8409d50

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎autoload/airline/extensions/codeowners.vim

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,5 @@ endif
88
let g:loaded_vim_airline_codeowners = 1
99

1010
function! airline#extensions#codeowners#init(ext)
11-
call airline#parts#define_raw('codeowners', '%{airline#extensions#codeowners#who()}')
12-
endfunction
13-
14-
function! airline#extensions#codeowners#who()
15-
return codeowners#who(bufname())
11+
call airline#parts#define_raw('codeowners', '%{codeowners#whoBufname()}')
1612
endfunction

‎autoload/codeowners.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ function! codeowners#isCodeownersFileExist()
1212
return filereadable(s:projectDir . '/.github/CODEOWNERS')
1313
endfunction
1414

15+
function! codeowners#whoBufname()
16+
return codeowners#who(bufname())
17+
endfunction
18+
1519
function! codeowners#who(file)
1620
if !has_key(s:cache, a:file)
1721
if !codeowners#isCodeownersFileExist()

0 commit comments

Comments
 (0)
Please sign in to comment.