Skip to content

Commit

Permalink
NeomakeDisable: do not try to delete non-existing augroup (#1972)
Browse files Browse the repository at this point in the history
Fixes:

> Vim(autocmd):E216: No such group or event: neomake

Ref: #1969.
  • Loading branch information
blueyed committed Jun 18, 2018
1 parent ed2d206 commit 229eca4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin/neomake.vim
Expand Up @@ -37,8 +37,10 @@ function! s:disable(scope, disabled) abort
call neomake#config#set_dict(a:scope, 'neomake.disabled', a:disabled)
if a:scope is# g:
if a:disabled
autocmd! neomake
augroup! neomake
if exists('#neomake')
autocmd! neomake
augroup! neomake
endif
else
call s:setup_autocmds()
endif
Expand Down
2 changes: 2 additions & 0 deletions tests/toggle.vader
Expand Up @@ -105,6 +105,8 @@ Execute (NeomakeStatus with disabling commands):

NeomakeDisable
Assert !exists('#neomake'), 'neomake augroup has been removed'
" Can be disabled again (no error when trying to delete augroup).
NeomakeDisable
NeomakeStatus

NeomakeDisableTab
Expand Down

0 comments on commit 229eca4

Please sign in to comment.