From 3ffdb062c6539dc3eb58ffdf30cf3dcb7290ba59 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 30 Sep 2015 12:52:10 -0400 Subject: [PATCH] Allow for empty lists in ns declaration --- plugin/fireplace.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fireplace.vim b/plugin/fireplace.vim index 5c2d161..c2a5a5f 100644 --- a/plugin/fireplace.vim +++ b/plugin/fireplace.vim @@ -1432,7 +1432,7 @@ function! fireplace#resolve_alias(name) abort endif let _ = {} for refs in filter(copy(s:ns()), 'type(v:val) == type([])') - if a:name =~# '^\u' && refs[0] is# ':import' + if a:name =~# '^\u' && get(refs, 0) is# ':import' for _.ref in refs if type(_.ref) == type([]) && index(_.ref, a:name) > 0 return _.ref[0] . '.' . a:name @@ -1441,7 +1441,7 @@ function! fireplace#resolve_alias(name) abort endif endfor endif - if refs[0] is# ':require' + if get(refs, 0) is# ':require' for _.ref in refs if type(_.ref) == type([]) let i = index(_.ref, ':as')