summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorTomasz N <przepompownia@users.noreply.github.com>2019-03-12 18:49:48 +0100
committerw0rp <w0rp@users.noreply.github.com>2019-03-12 17:49:48 +0000
commit5f03bae41ca1fc63a9e607bed99c277249e9774e (patch)
tree158be9ccbf28a2f95e236887e765a556899b2cfa /autoload
parent365ffae6c4668f7aa89cc181e514bb6b2245c9a0 (diff)
downloadale-5f03bae41ca1fc63a9e607bed99c277249e9774e.zip
Fix parsing the third part of version string (#2355)
* Fix parsing the third part of version string * Add test * Test: fix checking cached version
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/semver.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/ale/semver.vim b/autoload/ale/semver.vim
index 8f549c9f..5f1b46fc 100644
--- a/autoload/ale/semver.vim
+++ b/autoload/ale/semver.vim
@@ -14,10 +14,10 @@ function! ale#semver#GetVersion(executable, version_lines) abort
let l:version = get(s:version_cache, a:executable, [])
for l:line in a:version_lines
- let l:match = matchlist(l:line, '\v(\d+)\.(\d+)\.?(\d?)')
+ let l:match = matchlist(l:line, '\v(\d+)\.(\d+)(\.(\d+))?')
if !empty(l:match)
- let l:version = [l:match[1] + 0, l:match[2] + 0, l:match[3] + 0]
+ let l:version = [l:match[1] + 0, l:match[2] + 0, l:match[4] + 0]
let s:version_cache[a:executable] = l:version
break