Commits

ZyX_I committed e1ddbe6

@aurum/cache: Fixed getcrf

  • Participants
  • Parent commits b47fad9

Comments (0)

Files changed (1)

File plugin/aurum/cache.vim

         let cbvar={}
     endif
     let cbvar=s:cachebvars[buf]
-    if has_key(cbvar, '__relfname')
-        return cbvar.__relfname
+    if has_key(cbvar, '__relfname') && has_key(cbvar, 'repo') &&
+                \localtime()-cbvar._timerepo<cbvar._maxtimerepo
+        return [cbvar, cbvar.repo, cbvar.__relfname]
     endif
     let [hasbuf, repo, rev, file]=s:_r.cmdutils.getrrf({}, 0, 'get')
     if repo isnot 0
         let cbvar.repo=repo
         let cbvar._timerepo=localtime()
+        let cbvar._maxtimerepo=s:_f.getoption('repocachetime')
     endif
     let cbvar.__relfname=file
     return [cbvar, repo, file]