aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/dist/vim.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/autoload/dist/vim.vim')
-rw-r--r--runtime/autoload/dist/vim.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/autoload/dist/vim.vim b/runtime/autoload/dist/vim.vim
index 021244c93b..bb858c5732 100644
--- a/runtime/autoload/dist/vim.vim
+++ b/runtime/autoload/dist/vim.vim
@@ -18,6 +18,9 @@ endif
if !has('vim9script')
function dist#vim#IsSafeExecutable(filetype, executable)
let cwd = getcwd()
+ if empty(exepath(a:executable))
+ return v:false
+ endif
return get(g:, a:filetype .. '_exec', get(g:, 'plugin_exec', 0)) &&
\ (fnamemodify(exepath(a:executable), ':p:h') !=# cwd
\ || (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1 &&