From: Daniel Hahler Date: Mon, 6 Jan 2020 13:29:46 +0000 (+0100) Subject: ext/Vim/jinja.vim: fix issues reported by vint X-Git-Tag: 2.11.0~11^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d31e66c6ba5a9b4e8b610608f1a9bc114c3ec23c;p=thirdparty%2Fjinja.git ext/Vim/jinja.vim: fix issues reported by vint --- diff --git a/ext/Vim/jinja.vim b/ext/Vim/jinja.vim index 6ab9e5b7..e2a5bbf6 100644 --- a/ext/Vim/jinja.vim +++ b/ext/Vim/jinja.vim @@ -20,7 +20,7 @@ endif " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 + if v:version < 600 syntax clear elseif exists("b:current_syntax") finish @@ -30,7 +30,7 @@ endif " Pull in the HTML syntax. if g:jinja_syntax_html - if version < 600 + if v:version < 600 so :p:h/html.vim else runtime! syntax/html.vim @@ -98,8 +98,8 @@ syn match jinjaStatement containedin=jinjaTagBlock contained /\= 508 || !exists("did_jinja_syn_inits") - if version < 508 +if v:version >= 508 || !exists("did_jinja_syn_inits") + if v:version < 508 let did_jinja_syn_inits = 1 command -nargs=+ HiLink hi link else @@ -133,6 +133,6 @@ endif let b:current_syntax = "jinja" -if main_syntax == 'jinja' +if main_syntax ==# 'jinja' unlet main_syntax endif