mirror of
https://github.com/vim-python/python-syntax.git
synced 2025-12-08 13:44:48 +08:00
Fix behaviour of b:python_version_2 variable
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
Revision 3.3.2 (2013-06-01):
|
||||
|
||||
- Fixed behaviour of b:python_version_2 variable. Reported by Will Gray.
|
||||
|
||||
Revision 3.3.1 (2013-05-12):
|
||||
|
||||
- The script was moved to its own repository at
|
||||
|
||||
@@ -133,3 +133,4 @@ Contributors
|
||||
- Andrea Riciputi
|
||||
- Anton Butanaev
|
||||
- Marc Weber
|
||||
- Will Gray
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
" Language: Python
|
||||
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
||||
" URL: https://github.com/hdima/python-syntax
|
||||
" Last Change: 2013-05-12
|
||||
" Last Change: 2013-06-01
|
||||
" Filenames: *.py
|
||||
" Version: 3.3.1
|
||||
" Version: 3.3.2
|
||||
"
|
||||
" Based on python.vim (from Vim 6.1 distribution)
|
||||
" by Neil Schemenauer <nas at python dot ca>
|
||||
@@ -27,6 +27,7 @@
|
||||
" Andrea Riciputi
|
||||
" Anton Butanaev
|
||||
" Marc Weber
|
||||
" Will Gray
|
||||
"
|
||||
" Options
|
||||
" =======
|
||||
@@ -99,12 +100,15 @@ endfunction
|
||||
|
||||
" Check if option is enabled
|
||||
function! s:Enabled(name)
|
||||
return exists(a:name) && {a:name} != 0
|
||||
return exists(a:name) && {a:name}
|
||||
endfunction
|
||||
|
||||
" Is it Python 2 syntax?
|
||||
function! s:Python2Syntax()
|
||||
return s:Enabled("b:python_version_2") || s:Enabled("g:python_version_2")
|
||||
if exists("b:python_version_2")
|
||||
return b:python_version_2
|
||||
endif
|
||||
return s:Enabled("g:python_version_2")
|
||||
endfunction
|
||||
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user