fix: Use standardized names for current buffer fuzzy find (#737)
This commit is contained in:
@@ -340,9 +340,9 @@ files.current_buffer_fuzzy_find = function(opts)
|
|||||||
for lnum, line in ipairs(lines) do
|
for lnum, line in ipairs(lines) do
|
||||||
table.insert(lines_with_numbers, {
|
table.insert(lines_with_numbers, {
|
||||||
lnum = lnum,
|
lnum = lnum,
|
||||||
line = line,
|
|
||||||
bufnr = bufnr,
|
bufnr = bufnr,
|
||||||
filename = filename,
|
filename = filename,
|
||||||
|
text = line,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -694,7 +694,7 @@ function make_entry.gen_from_buffer_lines(opts)
|
|||||||
return displayer {
|
return displayer {
|
||||||
{ entry.lnum, opts.lnum_highlight_group or 'TelescopeResultsSpecialComment' },
|
{ entry.lnum, opts.lnum_highlight_group or 'TelescopeResultsSpecialComment' },
|
||||||
{
|
{
|
||||||
entry.line, function()
|
entry.text, function()
|
||||||
if not opts.line_highlights then return {} end
|
if not opts.line_highlights then return {} end
|
||||||
|
|
||||||
local line_hl = opts.line_highlights[entry.lnum] or {}
|
local line_hl = opts.line_highlights[entry.lnum] or {}
|
||||||
@@ -713,17 +713,17 @@ function make_entry.gen_from_buffer_lines(opts)
|
|||||||
end
|
end
|
||||||
|
|
||||||
return function(entry)
|
return function(entry)
|
||||||
if opts.skip_empty_lines and string.match(entry.line, '^$') then
|
if opts.skip_empty_lines and string.match(entry.text, '^$') then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
valid = true,
|
valid = true,
|
||||||
ordinal = entry.line,
|
ordinal = entry.text,
|
||||||
display = make_display,
|
display = make_display,
|
||||||
filename = entry.filename,
|
filename = entry.filename,
|
||||||
lnum = entry.lnum,
|
lnum = entry.lnum,
|
||||||
line = entry.line,
|
text = entry.text,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user