use autocmd! [group] to remove the auto-commands

This commit is contained in:
itchyny
2020-11-10 22:34:57 +09:00
parent 53176a0b75
commit 2d482e82f2

View File

@@ -2,7 +2,7 @@
" Filename: autoload/lightline.vim
" Author: itchyny
" License: MIT License
" Last Change: 2020/11/05 20:04:51.
" Last Change: 2020/11/10 22:25:26.
" =============================================================================
let s:save_cpo = &cpo
@@ -55,9 +55,7 @@ function! lightline#enable() abort
autocmd ColorScheme * if !has('vim_starting') || expand('<amatch>') !=# 'macvim'
\ | call lightline#update() | call lightline#highlight() | endif
augroup END
augroup lightline-disable
autocmd!
augroup END
autocmd! lightline-disable
augroup! lightline-disable
endfunction
@@ -68,9 +66,7 @@ function! lightline#disable() abort
call settabwinvar(t, n, '&statusline', '')
endfor
endfor
augroup lightline
autocmd!
augroup END
autocmd! lightline
augroup! lightline
augroup lightline-disable
autocmd!