mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 22:30:04 +08:00
Fix api import (#2418)
This commit is contained in:
parent
bb928a13f5
commit
f8b5fca38c
@ -27,6 +27,9 @@
|
||||
|
||||
let s:apis = {}
|
||||
|
||||
" the api itself is a dict, and it will be changed when user use the api. so
|
||||
" every time when request a api, we should provide an clean api.
|
||||
|
||||
|
||||
""
|
||||
"@public
|
||||
@ -39,7 +42,7 @@ function! SpaceVim#api#import(name) abort
|
||||
let p = {}
|
||||
try
|
||||
let p = SpaceVim#api#{a:name}#get()
|
||||
let s:apis[a:name] = p
|
||||
let s:apis[a:name] = deepcopy(p)
|
||||
catch /^Vim\%((\a\+)\)\=:E117/
|
||||
endtry
|
||||
return p
|
||||
|
@ -20,3 +20,4 @@ Execute ( SpaceVim api: logger ):
|
||||
AssertEqual len(split(log.view(1), "\n")), 7
|
||||
AssertEqual len(split(log.view(2), "\n")), 6
|
||||
AssertEqual len(split(log.view(3), "\n")), 4
|
||||
unlet log
|
||||
|
Loading…
Reference in New Issue
Block a user