Use &l:equalprg so local options do not override global ones

This commit is contained in:
w0rp 2018-08-17 10:10:49 +01:00
parent ad8b260519
commit 61a0716837
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83
3 changed files with 4 additions and 4 deletions

View File

@ -243,7 +243,7 @@ endfunction
" (name, func, filetypes, desc, aliases)
function! ale#fix#registry#Add(name, func, filetypes, desc, ...) abort
" This command will throw from the sandbox.
let &equalprg=&equalprg
let &l:equalprg=&l:equalprg
if type(a:name) isnot v:t_string
throw '''name'' must be a String'

View File

@ -53,7 +53,7 @@ endfunction
" Do not call this function.
function! ale#linter#GetLintersLoaded() abort
" This command will throw from the sandbox.
let &equalprg=&equalprg
let &l:equalprg=&l:equalprg
return s:linters
endfunction
@ -295,7 +295,7 @@ endfunction
function! ale#linter#Define(filetype, linter) abort
" This command will throw from the sandbox.
let &equalprg=&equalprg
let &l:equalprg=&l:equalprg
if !has_key(s:linters, a:filetype)
let s:linters[a:filetype] = []

View File

@ -268,7 +268,7 @@ endfunction
" See :help sandbox
function! ale#util#InSandbox() abort
try
let &equalprg=&equalprg
let &l:equalprg=&l:equalprg
catch /E48/
" E48 is the sandbox error.
return 1