From f33fbfd39159d5f300eab8a278662c623bdf8a80 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sat, 26 Aug 2017 20:17:33 +0800 Subject: [PATCH] Bug: can not override layer options. Fix #793 --- autoload/SpaceVim/layers.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autoload/SpaceVim/layers.vim b/autoload/SpaceVim/layers.vim index 736499758..ca9ac0463 100644 --- a/autoload/SpaceVim/layers.vim +++ b/autoload/SpaceVim/layers.vim @@ -12,9 +12,12 @@ function! SpaceVim#layers#load(layer, ...) abort endif if index(g:spacevim_plugin_groups, a:layer) == -1 call add(g:spacevim_plugin_groups, a:layer) - if a:0 == 1 && type(a:1) == 4 + endif + if a:0 == 1 && type(a:1) == 4 + try call SpaceVim#layers#{a:layer}#set_variable(a:1) - endif + catch /^Vim\%((\a\+)\)\=:E117/ + endtry endif if a:0 > 0 && type(a:1) == 1 for l in a:000