Merge pull request #544 from wincent/fix-autocmd

Use <nomodeline> when firing user autocmds
This commit is contained in:
Holger Rapp 2015-08-07 07:52:42 +02:00
commit 29ad00ec0f

View File

@ -374,7 +374,7 @@ class SnippetManager(object):
'autocmd CmdwinLeave * call UltiSnips#LeavingBuffer()')
_vim.command('augroup END')
_vim.command('silent doautocmd User UltiSnipsEnterFirstSnippet')
_vim.command('silent doautocmd <nomodeline> User UltiSnipsEnterFirstSnippet')
self._inner_state_up = True
def _teardown_inner_state(self):
@ -382,7 +382,7 @@ class SnippetManager(object):
if not self._inner_state_up:
return
try:
_vim.command('silent doautocmd User UltiSnipsExitLastSnippet')
_vim.command('silent doautocmd <nomodeline> User UltiSnipsExitLastSnippet')
if self.expand_trigger != self.forward_trigger:
_vim.command('iunmap <buffer> %s' % self.forward_trigger)
_vim.command('sunmap <buffer> %s' % self.forward_trigger)