From 14025c725f4d94c6661071cfa85fc5c996e8b390 Mon Sep 17 00:00:00 2001 From: w0rp Date: Thu, 5 Jul 2018 00:40:15 +0100 Subject: [PATCH] Optimise ale#Set slightly --- autoload/ale.vim | 6 +++--- 1 file 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.