mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 12:14:24 +08:00
wordcount: move User autocommand to plugin
Do not scatter the autocommands around, but rather move the auto command to the main plugin file. The function that handles the auto command will be created in the autoload script. Also add a call to force updating the tabline, if g:airline_statusline_ontop is defined. In addition, the wordcount() extension did not correctly notice block-wise visual mode, so while creating the airline#mode_changed() function, make the mode also detect blockwise visual mode correctly.
This commit is contained in:
@@ -145,6 +145,7 @@ function! s:airline_toggle()
|
||||
autocmd BufWritePost */autoload/airline/themes/*.vim
|
||||
\ exec 'source '.split(globpath(&rtp, 'autoload/airline/themes/'.g:airline_theme.'.vim', 1), "\n")[0]
|
||||
\ | call airline#load_theme()
|
||||
autocmd User AirlineModeChanged nested call airline#mode_changed()
|
||||
|
||||
if get(g:, 'airline_statusline_ontop', 0)
|
||||
" Force update of tabline more often
|
||||
|
||||
Reference in New Issue
Block a user