Commits

ZyX_I committed 5f45eaa

Moved :runtime command to returned value

Comments (0)

Files changed (1)

autoload/frawor.vim

 function frawor#Setup(version, dependencies, oneload)
-    if !exists('*FraworRegister')
-        runtime! plugin/frawor.vim
-    endif
     if type(a:version)==type("")
         let ver=map(split(a:version, '\.'), '+v:val')
     else
                 \   '(map(split(v:val, "\\."), "+v:val")):'.
                 \   '(v:val))')
     let expr='+matchstr(expand("<sfile>"), ''\d\+'')'
+    let oneload=(!!a:oneload)
     return       'execute "function s:Eval(expr)\n'.
                 \         '    return eval(a:expr)\n'.
                 \         "endfunction\"\n".
                 \"let s:g={}\n".
                 \"let s:F={}\n".
+                \"let s:g._pluginloaded=".oneload."\n".
+                \((exists('*FraworRegister'))?
+                \   (""):
+                \   ("runtime! plugin/frawor.vim\n")).
                 \"let s:g._frawor=FraworRegister(".string(ver).", ".
                 \                               "s:Eval(".string(expr)."), ".
                 \                               "expand('<sfile>:p'), ".
                 \                                string(deps).", ".
-                \                               (!!a:oneload).", s:g, s:F)"
+                \                                oneload.", s:g, s:F)"
 endfunction