( version_string )
| 1408 | |
| 1409 | # Expects version_string in 'MAJOR.MINOR.PATCH' format, e.g. '8.1.278' |
| 1410 | def 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 | |
| 1422 | def AutoCloseOnCurrentBuffer( name ): |
nothing calls this directly
no test coverage detected