mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-25 23:14:50 +02:00
wordcount: skip updating wordcount for vimtex#misc#wordcount() in visual mode
closes #2624
This commit is contained in:
parent
c7460aa883
commit
18b85395d3
@ -11,7 +11,12 @@ if exists('*wordcount')
|
||||
endif
|
||||
if &filetype ==# 'tex' && exists('b:vimtex') && get(g:, 'airline#extensions#vimtex#wordcount', 0)
|
||||
" We're in a TeX file and vimtex is a plugin, so use vimtex's wordcount...
|
||||
return vimtex#misc#wordcount()
|
||||
if a:visual_mode_active
|
||||
" not useful?
|
||||
return
|
||||
else
|
||||
return vimtex#misc#wordcount()
|
||||
endif
|
||||
else
|
||||
let query = a:visual_mode_active ? 'visual_words' : 'words'
|
||||
return get(wordcount(), query, 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user