diff options
Diffstat (limited to 'runtime/ftplugin/zig.vim')
-rw-r--r-- | runtime/ftplugin/zig.vim | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/runtime/ftplugin/zig.vim b/runtime/ftplugin/zig.vim index 291fe44b11..28b8cd5a67 100644 --- a/runtime/ftplugin/zig.vim +++ b/runtime/ftplugin/zig.vim @@ -41,16 +41,13 @@ let &l:define='\v(<fn>|<const>|<var>|^\s*\#\s*define)' " Safety check: don't execute zig from current directory if !exists('g:zig_std_dir') && exists('*json_decode') && - \ executable('zig') && get(g:, 'zig_exec', get(g:, 'plugin_exec', 0)) - \ && (fnamemodify(exepath("zig"), ":p:h") != s:tmp_cwd - \ || (index(split($PATH,has("win32")? ';' : ':'), s:tmp_cwd) != -1 && s:tmp_cwd != '.')) + \ executable('zig') && dist#vim#IsSafeExecutable('zig', 'zig') silent let s:env = system('zig env') if v:shell_error == 0 let g:zig_std_dir = json_decode(s:env)['std_dir'] endif unlet! s:env endif -unlet! s:tmp_cwd if exists('g:zig_std_dir') let &l:path = g:zig_std_dir . ',' . &l:path |