feat: added trim option to make_entry.gen_from_quickfix (#1838)

This commit is contained in:
rowario
2022-04-18 10:23:07 +03:00
committed by GitHub
parent 831f76a809
commit 32505ece72
3 changed files with 20 additions and 0 deletions

View File

@@ -324,6 +324,10 @@ function make_entry.gen_from_quickfix(opts)
local line_info = { table.concat({ entry.lnum, entry.col }, ":"), "TelescopeResultsLineNr" }
if opts.trim_text then
entry.text = entry.text:gsub("^%s*(.-)%s*$", "%1")
end
return displayer {
line_info,
entry.text:gsub(".* | ", ""),