Optimise ale#Set slightly
This commit is contained in:
parent
13a8f9c061
commit
14025c725f
@ -207,10 +207,10 @@ endfunction
|
|||||||
" Every variable name will be prefixed with 'ale_'.
|
" Every variable name will be prefixed with 'ale_'.
|
||||||
function! ale#Set(variable_name, default) abort
|
function! ale#Set(variable_name, default) abort
|
||||||
let l:full_name = 'ale_' . a:variable_name
|
let l:full_name = 'ale_' . a:variable_name
|
||||||
let l:value = get(g:, l:full_name, a:default)
|
|
||||||
let g:[l:full_name] = l:value
|
|
||||||
|
|
||||||
return l:value
|
if !has_key(g:, l:full_name)
|
||||||
|
let g:[l:full_name] = a:default
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Escape a string suitably for each platform.
|
" Escape a string suitably for each platform.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user