aboutsummaryrefslogtreecommitdiff
path: root/neovim/patch/0001-fix-provider-compare-versions-as-number-not-string-1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'neovim/patch/0001-fix-provider-compare-versions-as-number-not-string-1.patch')
-rw-r--r--neovim/patch/0001-fix-provider-compare-versions-as-number-not-string-1.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/neovim/patch/0001-fix-provider-compare-versions-as-number-not-string-1.patch b/neovim/patch/0001-fix-provider-compare-versions-as-number-not-string-1.patch
new file mode 100644
index 0000000..1b7e5a3
--- /dev/null
+++ b/neovim/patch/0001-fix-provider-compare-versions-as-number-not-string-1.patch
@@ -0,0 +1,28 @@
+From e16adbf238ee46b59b68a84af17bdee10ca49418 Mon Sep 17 00:00:00 2001
+From: "Tejasvi S. Tomar" <45873379+tejasvi@users.noreply.github.com>
+Date: Fri, 8 Oct 2021 02:57:40 +0530
+Subject: [PATCH 1/1] fix(provider): compare versions as number, not string
+ #15937
+
+"3.10" < "3.3" but v3.10 > v3.3
+Fixes #14586
+---
+ 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 c292b374b..0eeb35cba 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
+--
+2.33.1
+