mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 20:24:27 +08:00
Move strchars into util.vim
This commit is contained in:
@@ -86,3 +86,13 @@ else
|
||||
return 0
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Compatibility wrapper for strchars, in case this vim version does not
|
||||
" have it natively
|
||||
function! airline#util#strchars(str)
|
||||
if exists('*strchars')
|
||||
return strchars(a:str)
|
||||
else
|
||||
return strlen(substitute(a:str, '.', 'a', 'g'))
|
||||
endif
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user