Avoid errors from older Vims that don't support <nomodeline>

The <nomodeline> flag for :doautocmd was implemented in 7.3.438. Certain
LTS distros, e.g. Ubuntu 12.04, come with even older Vim versions,
though.

Silently ignore the flag in such cases.

Closes https://github.com/mhinz/vim-signify/issues/185
This commit is contained in:
Marco Hinz 2016-06-19 13:47:53 +02:00
parent cb975a8c6f
commit 76bde232d1
2 changed files with 3 additions and 1 deletions

View File

@ -96,7 +96,7 @@ function! sy#start() abort
let b:sy.id_top = (g:id_top - 1)
silent doautocmd <nomodeline> User Signify
silent! doautocmd <nomodeline> User Signify
endfunction
" Function: #stop {{{1

View File

@ -418,6 +418,8 @@ removes all the signs that Sy placed in the current buffer. This may be
useful if your want to use the values from `sy#repo#get_stats()` but do not
want to see the signs.
NOTE: This feature requires at least Vim 7.3.438 for |<nomodeline>|.
==============================================================================
MAPPINGS *signify-mappings*