Commits

ZyX_I committed 588e356

Removed overwriting of `files' options: pattern versions now go to opts.filepats

Comments (0)

Files changed (3)

ftplugin/aurumgraphlog.vim

     let r=''
     let crrestrict=get(a:opts, 'crrestrict', 0)
     for [key, value] in filter(items(a:opts), 'crrestrict isnot# v:val[0]')
-        if type(value)==type({}) || key is# 'crrestrict'
+        if type(value)==type({}) || key is# 'crrestrict' || key is# 'filepats'
             unlet value
             continue
         endif
     endif
     "▶2 Generate file lists for `files' option
     if has_key(bvar.opts, 'files')
-        call map(bvar.opts.files, 's:_r.aurum.globtopattern(v:val)')
+        let bvar.opts.filepats=map(copy(bvar.opts.files),
+                    \              's:_r.aurum.globtopattern(v:val)')
         let bvar.opts.csfiles={}
         for cs in cslist
             let rns   = bvar.repo.functions.getcsprop(bvar.repo, cs, 'renames')
             let files = copy(files)
             let csfiles=[]
             let bvar.opts.csfiles[cs.hex]=csfiles
-            for pattern in bvar.opts.files
+            for pattern in bvar.opts.filepats
                 let newfiles=filter(copy(files), 'v:val=~#pattern')
                 call filter(files, 'index(newfiles, v:val)==-1')
                 let csfiles+=newfiles

ftplugin/aurumstatus.vim

             let ignore=0
             if has_key(bvar.opts, 'files')
                 let ignore=1
-                for pattern in bvar.opts.files
+                for pattern in bvar.opts.filepats
                     if file=~#pattern
                         let ignore=0
                         break
     if command is# 'glog'
         let [repo, opts]=s:F.comm.repotupleoptssplit(tail, 0)
         if has_key(opts, 'files')
-            let opts.files=map(split(opts.files, '\v%(\\@<!\\%(\\\\)*)@<!;'),
-                        \            's:F.comm.globtopattern(v:val)')
+            let opts.filepats=map(split(opts.files, '\v%(\\@<!\\%(\\\\)*)@<!;'),
+                        \         's:F.comm.globtopattern(v:val)')
         endif
         if has_key(opts, 'revrange')
             let opts.revrange=split(opts.revrange, ';')
         let [repo, opts]=s:F.comm.repotupleoptssplit(tail, 0)
         let buf=bufnr('%')
         if has_key(opts, 'files')
-            let opts.files=map(split(opts.files, '\v%(\\@<!\\%(\\\\)*)@<!;'),
-                        \      's:F.comm.globtopattern(v:val)')
+            let opts.filepats=map(split(opts.files, '\v%(\\@<!\\%(\\\\)*)@<!;'),
+                        \         's:F.comm.globtopattern(v:val)')
         endif
         if has_key(opts, 'show')
             let opts.show=split(opts.show, ';')