24 lines
1.2 KiB
Diff
24 lines
1.2 KiB
Diff
|
From e78fc38908dfb9f952e75026987f0db1f9ce4253 Mon Sep 17 00:00:00 2001
|
||
|
From: "Tejasvi S. Tomar" <45873379+tejasvi@users.noreply.github.com>
|
||
|
Date: Thu, 7 Oct 2021 11:41:52 +0530
|
||
|
Subject: [PATCH] Fix python provider's minor version comparison
|
||
|
|
||
|
`'3.10' < '3.3'` but v3.10 > v3.3
|
||
|
---
|
||
|
runtime/autoload/provider/pythonx.vim | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/runtime/autoload/provider/pythonx.vim b/runtime/autoload/provider/pythonx.vim
|
||
|
index c292b374b6f5..0eeb35cba8f1 100644
|
||
|
--- a/runtime/autoload/provider/pythonx.vim
|
||
|
+++ b/runtime/autoload/provider/pythonx.vim
|
||
|
@@ -96,7 +96,7 @@ function! provider#pythonx#CheckForModule(prog, module, major_version) abort
|
||
|
if prog_version !~ '^' . a:major_version
|
||
|
return [0, prog_path . ' is Python ' . prog_version . ' and cannot provide Python '
|
||
|
\ . a:major_version . '.']
|
||
|
- elseif prog_version =~ '^' . a:major_version && prog_version < min_version
|
||
|
+ elseif prog_version =~ '^' . a:major_version && str2nr(prog_version[2:]) < str2nr(min_version[2:])
|
||
|
return [0, prog_path . ' is Python ' . prog_version . ' and cannot provide Python >= '
|
||
|
\ . min_version . '.']
|
||
|
endif
|