ZyX_I committed 8d470ae

@%Powerline/Functions/aurum: Added missing s:_functions modifications
@%aurum/move: Fixed #49 (move to a subdirectory fails)
@aurum: Added aurumcmd.unload feature function
Should now be able to reload @%aurum/* plugins correctly

Comments (0)

Files changed (3)


     let r=aurum#branch()
     return empty(r) ? '' : a:symbol.' '.r
+let s:_functions+=['Powerline#Functions#aurum#GetBranch']
 function Powerline#Functions#aurum#GetStatus()
     let r=aurum#status()
     return (empty(r) || r is# 'clean') ? '' : toupper(r[0])
+let s:_functions+=['Powerline#Functions#aurum#GetStatus']


             let moves[file]=repo.functions.reltorepo(repo, target)
-    elseif a:0==2 && !isdirectory(a:2) && filewritable(a:1)
+    elseif a:0==2 && !isdirectory(a:2) && a:2[-1:] isnot# '/'
         let fst=a:1
         if fst is# ':'
             let fst=s:_r.cmdutils.getrrf(rrfopts, 'nocurf', 'getfile')[3]
-        let moves = {repo.functions.reltorepo(repo, fst):
-                    \repo.functions.reltorepo(repo, a:2)}
+        if filewritable(fst)
+            let moves = {repo.functions.reltorepo(repo, fst):
+                        \repo.functions.reltorepo(repo, a:2)}
+        else
+            let notfound=1
+        endif
+        let notfound=1
+    endif
+    if exists('notfound')
         let globs=filter(copy(a:000), 'v:val isnot# ":"')
         let hascur=(len(globs)!=a:0)
-        if a:0==1 || !(isdirectory(globs[-1]) && globs[-1][-1:] isnot# '/')
+        if a:0==1 || !(isdirectory(globs[-1]) || globs[-1][-1:] is# '/')
             let target='.'
             let target=remove(globs, -1)
     let a:plugdict.g.cmd={}
     let s:cmddicts[]=a:plugdict.g.cmd
+function s:feature.unload(plugdict, fdict)
+    unlet s:cmddicts[]
+    if has_key(s:cmdfuncs,
+        unlet s:cmdfuncs[]
+    endif
 call s:_f.newfeature('aurumcmd', s:feature)
 "▶1 Global mappings
 " TODO mapping that closes status window
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.