fix: allow preceeding spaces in filter match pattern

This commit is contained in:
Senghan Bright 2021-08-05 12:40:16 +02:00
parent 31e8158d54
commit 459041fb42

View File

@ -185,7 +185,7 @@ local frecency = function(opts)
end
local delim = opts.filter_delimiter or ":"
local filter_re = "^(" .. delim .. "(%S+)" .. delim .. ")"
local filter_re = "^%s*(" .. delim .. "(%S+)" .. delim .. ")"
state.picker = pickers.new(opts, {
prompt_title = "Frecency",
@ -210,6 +210,7 @@ local frecency = function(opts)
results = state.results,
entry_maker = entry_maker,
}
-- print(vim.inspect(new_finder))
end
return { prompt = query_text, updated_finder = new_finder }