mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-24 14:35:32 +02:00
wordcount: only test against complete filetypes
Put a word-boundary regex atom before and after the current filetype, to make sure that a `C` filetype won't be detected as a filetype that enables the wordcount extension. (`c` matches asciidoc).
This commit is contained in:
parent
12aa326dae
commit
7c31850381
@ -98,7 +98,7 @@ function! airline#extensions#wordcount#apply(...)
|
||||
|
||||
" Select test based on type of "filetypes": new=list, old=string
|
||||
if type(filetypes) == get(v:, 't_list', type([]))
|
||||
\ ? match(filetypes, ft) > -1 || index(filetypes, 'all') > -1
|
||||
\ ? match(filetypes, '\<'. ft. '\>') > -1 || index(filetypes, 'all') > -1
|
||||
\ : match(&filetype, filetypes) > -1
|
||||
let b:airline_changedtick = -1
|
||||
call s:update_wordcount(1) " force update: ensures initial worcount exists
|
||||
|
Loading…
x
Reference in New Issue
Block a user