Commits

ZyX_I committed c9f2d97

Rearranged some functions

Comments (0)

Files changed (1)

                 \'\V\\{'.char2nr('\').'}', '\\\\', 'g'),
                 \'\V\\{\(\d\+\)}', '\=nr2char(submatch(1))', 'g').'\$'
 endfunction
-"▶3 glogfunc
-function s:glogfunc.function(repo, opts)
-    new aurum://glog:no-op
-    if has_key(a:opts, 'rev')
-        call map(a:opts.rev,
-                    \'a:repo.changesets['.
-                    \   'a:repo.functions.getrevhex(a:repo, v:val)].rev')
-    endif
-    let s:bufvars[bufnr('%')]={'repo': a:repo, 'opts': a:opts}
-    setlocal buftype=nofile filetype=aurumgraphlog bufhidden=wipe
-    runtime ftplugin/aurumgraphlog.vim
-endfunction
-let s:glogfunc['@FWC']=['[:=(".")(either(path d, match @\v^\w+%(\+\w+)*\V://@)'.
-            \                    '|*F.comm.getrepo)'.
-            \           ' { *?files   (type "" |*F.comm.globtopattern)'.
-            \           '    ?date    match /\v%(\d\d?|\*)'.
-            \                                 '%(\.%(\d\d?|\*)'.
-            \                                 '%(\.%(\d\d%(\d\d)?|\*)'.
-            \                                 '%(\ %(\d\d?|\*)'.
-            \                                 '%(\:%(\d\d?|\*))?)?)?)?/'.
-            \           '    ?search  isreg'.
-            \           '  +2?rev     type "" type ""'.
-            \           '   !?merges'.
-            \           '    ?user    isreg'.
-            \           '    ?branch  type ""'.
-            \           '   !?patch'.
-            \           '    ?limit   range 1 inf'.
-            \           '   !?stat'.
-            \           '   !?showfiles}]',
-            \'filter']
-call add(s:glogcomp,
-            \substitute(substitute(s:glogfunc['@FWC'][0],
-            \'\V|*F.comm.getrepo',  '',           ''),
-            \'\vfiles\s+\([^)]*\)', 'files path', ''))
 "▶3 auefunc
 let s:bufvars={}
 "▶4 comm.repotuplesplit :: str, UInt → (repo, String, ...)
         call setline('.', repo.functions.diff(repo, rev1, rev2, filelist, opts))
     endif
 endfunction
-"▶3 aubwfunc
-function s:aubwfunc.function()
-    let buf=+expand('<abuf>')
-    unlet s:bufvars[buf]
+"▶3 glogfunc
+function s:glogfunc.function(repo, opts)
+    new aurum://glog:no-op
+    if has_key(a:opts, 'rev')
+        call map(a:opts.rev,
+                    \'a:repo.changesets['.
+                    \   'a:repo.functions.getrevhex(a:repo, v:val)].rev')
+    endif
+    let s:bufvars[bufnr('%')]={'repo': a:repo, 'opts': a:opts}
+    setlocal buftype=nofile filetype=aurumgraphlog bufhidden=wipe
+    runtime ftplugin/aurumgraphlog.vim
 endfunction
+let s:glogfunc['@FWC']=['[:=(".")(either(path d, match @\v^\w+%(\+\w+)*\V://@)'.
+            \                    '|*F.comm.getrepo)'.
+            \           ' { *?files   (type "" |*F.comm.globtopattern)'.
+            \           '    ?date    match /\v%(\d\d?|\*)'.
+            \                                 '%(\.%(\d\d?|\*)'.
+            \                                 '%(\.%(\d\d%(\d\d)?|\*)'.
+            \                                 '%(\ %(\d\d?|\*)'.
+            \                                 '%(\:%(\d\d?|\*))?)?)?)?/'.
+            \           '    ?search  isreg'.
+            \           '  +2?rev     type "" type ""'.
+            \           '   !?merges'.
+            \           '    ?user    isreg'.
+            \           '    ?branch  type ""'.
+            \           '   !?patch'.
+            \           '    ?limit   range 1 inf'.
+            \           '   !?stat'.
+            \           '   !?showfiles}]',
+            \'filter']
+call add(s:glogcomp,
+            \substitute(substitute(s:glogfunc['@FWC'][0],
+            \'\V|*F.comm.getrepo',  '',           ''),
+            \'\vfiles\s+\([^)]*\)', 'files path', ''))
 "▶3 annfunc
 function s:annfunc.function(...)
     let repo=s:F.comm.getrepo('')
                 \                ':.:'.file)
     setlocal scrollbind
 endfunction
+"▶3 aubwfunc
+function s:aubwfunc.function()
+    let buf=+expand('<abuf>')
+    unlet s:bufvars[buf]
+endfunction
 "▶3 Post aurum resource
 call s:_f.postresource('aurum', {'bufvars': s:bufvars}, 1)
 "▶1