diff options
author | w0rp <devw0rp@gmail.com> | 2018-07-05 00:40:15 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-07-05 00:40:15 +0100 |
commit | 14025c725f4d94c6661071cfa85fc5c996e8b390 (patch) | |
tree | 8f5827815060f79fcc457364ccdcc26604f6c16d /autoload | |
parent | 13a8f9c06110c065086ce7e569bab68d0e222398 (diff) | |
download | ale-14025c725f4d94c6661071cfa85fc5c996e8b390.zip |
Optimise ale#Set slightly
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale.vim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/autoload/ale.vim b/autoload/ale.vim index 8aa8bbd9..f61418f6 100644 --- a/autoload/ale.vim +++ b/autoload/ale.vim @@ -207,10 +207,10 @@ endfunction " Every variable name will be prefixed with 'ale_'. function! ale#Set(variable_name, default) abort 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 " Escape a string suitably for each platform. |