ZyX_I committed 367f213

@aurum: Restored old behavior (set qf list to empty if no matching files found)

Comments (0)

Files changed (1)

             \'\Vcmd\s\+type ""',  'cmd '.s:_r.comp.cmd,  ''),
             \'\Vrev\s\+type ""',  'rev '.s:_r.comp.rev,  ''))
 "▶1 grepfunc
+function s:F.setlist(opts, list)
+    if has_key(a:opts, 'location')
+        return setloclist(a:opts.location, a:list)
+    else
+        return setqflist(a:list)
+    endif
 function s:grepfunc.function(pattern, opts)
     if has_key(a:opts, 'files') && a:opts.repo is# ':'
         let repo=s:_r.repo.get(a:opts.files[0])
         if empty(files)
             call s:_f.warn('nogf')
-            return
+            return s:F.setlist(a:opts, [])
     let wdfiles=((has_key(a:opts, 'wdfiles'))?(a:opts.wdfiles):
         let item.filename=s:_r.fname('file', repo, item.filename[0],
                     \                item.filename[1])
-    if has_key(a:opts, 'location')
-        return setloclist(a:opts.location, qf)
-    else
-        return setqflist(qf)
-    endif
+    return s:F.setlist(a:opts, qf)
 let s:grepfunc['@FWC']=['-onlystrings '.
             \           'type "" '.
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.