Search for wordcount formatters with extension

Autoload expects the autoload scripts to have the '.vim' extension.

Fixes #1986.
This commit is contained in:
Shayne Holmes 2019-04-09 11:48:01 -07:00
parent 86e73cade7
commit 979e04a6ec

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'