From b59609c74e879d2949f53df5dba2fa146e029260 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Wed, 13 Nov 2013 06:15:57 +0900 Subject: [PATCH] - Fixed neosnippet#util#set_default(). --- autoload/neosnippet/util.vim | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/autoload/neosnippet/util.vim b/autoload/neosnippet/util.vim index 900d53b..00ba8ee 100644 --- a/autoload/neosnippet/util.vim +++ b/autoload/neosnippet/util.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: util.vim " AUTHOR: Shougo Matsushita -" Last Modified: 12 Nov 2013. +" Last Modified: 13 Nov 2013. " License: MIT license {{{ " Permission is hereby granted, free of charge, to any person obtaining " a copy of this software and associated documentation files (the @@ -65,11 +65,8 @@ function! neosnippet#util#expand(path) "{{{ \ expand(escape(a:path, '*?[]"={}'), 1)) endfunction"}}} function! neosnippet#util#set_default(var, val, ...) "{{{ - if !exists(a:var) || type({a:var}) != type(a:val) - let alternate_var = get(a:000, 0, '') - - let {a:var} = exists(alternate_var) ? - \ {alternate_var} : a:val + if !exists(a:var) + let {a:var} = a:val endif endfunction"}}} function! neosnippet#util#set_dictionary_helper(...) "{{{