Merge pull request #1897 from shayneholmes/wordcount-formatters

Search for wordcount formatters with extension
This commit is contained in:
Christian Brabandt 2019-04-09 20:56:34 +02:00 committed by GitHub
commit cbf264ff5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ endfunction
" check user-defined formatter exists with appropriate functions, otherwise
" fall back to default
if s:formatter !=# 'default'
execute 'runtime! autoload/airline/extensions/wordcount/formatters/'.s:formatter
execute 'runtime! autoload/airline/extensions/wordcount/formatters/'.s:formatter.'.vim'
if !exists('*airline#extensions#wordcount#formatters#{s:formatter}#to_string')
if !exists('*airline#extensions#wordcount#formatters#{s:formatter}#format')
let s:formatter = 'default'