Make matcha use arg list by default
This commit is contained in:
parent
17fa5f5d4f
commit
df7f3c715a
1 changed files with 10 additions and 10 deletions
|
@ -32,21 +32,21 @@ local function colmatch(str, pattern)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function findLocations(args)
|
local function findLocations(args)
|
||||||
local files = vim.fs.find(function(file)
|
local files if #args>1 then
|
||||||
if #args>1 then
|
files = vim.fs.find(function(file)
|
||||||
for _, pattern in ipairs(args), args, 1 do
|
for _, pattern in ipairs(args), args, 1 do
|
||||||
if vim.fs.basename(file):find(pattern) then
|
if vim.fs.basename(file):find(pattern) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
return false
|
||||||
return true
|
end, {
|
||||||
end
|
limit=math.huge;
|
||||||
return false
|
type="file";
|
||||||
end, {
|
})
|
||||||
limit=math.huge;
|
else
|
||||||
type="file";
|
files = vim.fn.argv()
|
||||||
})
|
end
|
||||||
|
|
||||||
local locations = {}
|
local locations = {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue