aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-12-04 11:28:44 +0800
committerzeertzjq <zeertzjq@outlook.com>2025-12-04 11:54:27 +0800
commitbfe007a1872aa5700cd330eeebe5587b47b0450d (patch)
treeb1e42700cae771cc1c2046c04c643625e5a01b6b /runtime/lua/vim
parentac3e2ca6756598a0c9b342dfb3a8b25d9775ca9f (diff)
downloadrneovim-bfe007a1872aa5700cd330eeebe5587b47b0450d.tar.gz
rneovim-bfe007a1872aa5700cd330eeebe5587b47b0450d.tar.bz2
rneovim-bfe007a1872aa5700cd330eeebe5587b47b0450d.zip
vim-patch:9.1.1948: Windows: Vim adds current directory to search path
Problem: Windows: Vim always adds the current directory to search path. This should only happen when using cmd.exe as 'shell'. For example, powershell won't run binaries from the current directory. Solution: Only add current directory to system path, when using cmd.exe as 'shell'. related: vim/vim#10341 related: 083ec6d9a3b7 https://github.com/vim/vim/commit/4d87c9742a544a58c05cb34d4fbaac47e410b369 Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/_meta/vimfn.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua
index fc8b1e218f..91a1a57fa1 100644
--- a/runtime/lua/vim/_meta/vimfn.lua
+++ b/runtime/lua/vim/_meta/vimfn.lua
@@ -1650,10 +1650,12 @@ function vim.fn.eventhandler() end
--- On MS-Windows an executable in the same directory as the Vim
--- executable is always found (it's added to $PATH at |startup|).
--- *NoDefaultCurrentDirectoryInExePath*
---- On MS-Windows an executable in Vim's current working directory
---- is also normally found, but this can be disabled by setting
---- the `$NoDefaultCurrentDirectoryInExePath` environment variable.
---- This is always done for |:!| commands, for security reasons.
+--- On MS-Windows when using cmd.exe as 'shell' an executable in
+--- Vim's current working directory is also normally found, which
+--- can be disabled by setting the
+--- `$NoDefaultCurrentDirectoryInExePath` environment variable.
+--- This is always done when executing external commands using
+--- e.g. |:!|, |:make|, |system()| for security reasons.
---
--- The result is a Number:
--- 1 exists