robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
e790c87cd8
master
1" Vim runtime support library, 2" runs the Vim9 script version or legacy script version 3" on demand (mostly for Neovim compatibility) 4" 5" Maintainer: The Vim Project <https://github.com/vim/vim> 6" Last Change: 2026 Jan 11 7 8 9" enable the zip and gzip plugin by default, if not set 10if ! exists ( 'g:zip_exec' ) 11let g: zip_exec = 1 12endif 13 14if ! exists ( 'g:gzip_exec' ) 15let g: gzip_exec = 1 16endif 17 18if ! has ( 'vim9script' ) 19function dist#vim#IsSafeExecutable ( filetype , executable ) 20let cwd = getcwd () 21if empty ( exepath ( a: executable )) 22return v: false 23endif 24return get ( g:, a: filetype .. '_exec' , get ( g:, 'plugin_exec' , 0 )) && 25 \( fnamemodify ( exepath ( a: executable ), ':p:h' ) !=# cwd 26 \|| ( split ( $ PATH , has ( 'win32' ) ? ';' : ':' ) ->index ( cwd ) != -1 && 27 \cwd != '.' )) 28endfunction 29 30finish 31endif 32 33def dist#vim#IsSafeExecutable(filetype: string, executable: string): bool 34return dist#vim9#IsSafeExecutable ( filetype , executable ) 35enddef