MCPcopy Index your code
hub / github.com/ycm-core/YouCompleteMe / VimVersionAtLeast

Function VimVersionAtLeast

python/ycm/vimsupport.py:1410–1419  ·  view source on GitHub ↗
( version_string )

Source from the content-addressed store, hash-verified

1408
1409# Expects version_string in 'MAJOR.MINOR.PATCH' format, e.g. '8.1.278'
1410def VimVersionAtLeast( version_string ):
1411 major, minor, patch = ( int( x ) for x in version_string.split( '.' ) )
1412
1413 # For Vim 8.1.278, v:version is '801'
1414 actual_major_and_minor = GetIntValue( 'v:version' )
1415 matching_major_and_minor = major * 100 + minor
1416 if actual_major_and_minor != matching_major_and_minor:
1417 return actual_major_and_minor > matching_major_and_minor
1418
1419 return GetBoolValue( f"has( 'patch{ patch }' )" )
1420
1421
1422def AutoCloseOnCurrentBuffer( name ):

Callers

nothing calls this directly

Calls 2

GetIntValueFunction · 0.85
GetBoolValueFunction · 0.85

Tested by

no test coverage detected