]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(netrw): correct wrong version check
authorChristian Brabandt <cb@256bit.org>
Thu, 30 Jan 2025 09:58:07 +0000 (10:58 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 30 Jan 2025 10:00:35 +0000 (11:00 +0100)
The version check introduced with commit edd4ac3e8 has a logic error.
Also it should only trigger when trying to use the netrw plugin and not
always.

fixes: #16541

Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/pack/dist/opt/netrw/autoload/netrw.vim
runtime/plugin/netrwPlugin.vim

index 7d7ff15df7569c1af55d81a0456ac90329ebff21..243ff8738f4fd694bc6b4f8252e9585c1b41510a 100644 (file)
@@ -21,6 +21,11 @@ endif
 
 let g:loaded_netrw = "v176"
 
+if !has("patch-9.1.1054") && !has('nvim')
+  echoerr 'netrw needs Vim v9.1.1054'
+  finish
+endif
+
 let s:keepcpo= &cpo
 setl cpo&vim
 "DechoFuncName 1
index f3684bb27fc980819e8613427278c76e1bc5793e..6d7a8660ffbc3ebd987ad40ad73ecc3f06324fcb 100644 (file)
@@ -1,10 +1,5 @@
 " Load the netrw package.
 
-if !has("patch-9.1.1054") || !has('nvim')
-  echoerr 'netrw needs vim v9.1.1054'
-  finish
-endif
-
 if &cp || exists("g:loaded_netrw") || exists("g:loaded_netrwPlugin")
   finish
 endif