diff options
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | vim/autoload/patch.vim | 8 |
2 files changed, 6 insertions, 6 deletions
@@ -1,2 +1,2 @@ -tejr dotfiles v10.11.0 -Mon, 05 Oct 2020 10:30:47 +0000 +tejr dotfiles v10.12.0 +Mon, 05 Oct 2020 22:20:45 +0000 diff --git a/vim/autoload/patch.vim b/vim/autoload/patch.vim index 54637e09..614be462 100644 --- a/vim/autoload/patch.vim +++ b/vim/autoload/patch.vim @@ -4,15 +4,15 @@ " * <https://github.com/vim/vim/releases/tag/v7.4.236> " * <https://github.com/vim/vim/releases/tag/v7.4.237> " -function! patch#(feature) abort +function! patch#(version) abort - " If we're new enough, we can just run the native has() + " If we're new enough, we can just use the native has() if has('patch-7.4.237') - return has(a:feature) + return has('patch-'.a:version) endif " Otherwise, we need to start splitting and comparing numbers - let [major, minor, patch] = split(a:feature, '\.') + let [major, minor, patch] = split(a:version, '\.') " The v:version variable looks like e.g. 801 for v8.1 let l:version = major * 100 + minor |