Skip to content

Commit e5fbe6f

Browse files
authored
fix: Use standardized names for current buffer fuzzy find (#737)
1 parent d367eb4 commit e5fbe6f

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lua/telescope/builtin/files.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ files.current_buffer_fuzzy_find = function(opts)
340340
for lnum, line in ipairs(lines) do
341341
table.insert(lines_with_numbers, {
342342
lnum = lnum,
343-
line = line,
344343
bufnr = bufnr,
345344
filename = filename,
345+
text = line,
346346
})
347347
end
348348

lua/telescope/make_entry.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ function make_entry.gen_from_buffer_lines(opts)
694694
return displayer {
695695
{ entry.lnum, opts.lnum_highlight_group or 'TelescopeResultsSpecialComment' },
696696
{
697-
entry.line, function()
697+
entry.text, function()
698698
if not opts.line_highlights then return {} end
699699

700700
local line_hl = opts.line_highlights[entry.lnum] or {}
@@ -713,17 +713,17 @@ function make_entry.gen_from_buffer_lines(opts)
713713
end
714714

715715
return function(entry)
716-
if opts.skip_empty_lines and string.match(entry.line, '^$') then
716+
if opts.skip_empty_lines and string.match(entry.text, '^$') then
717717
return
718718
end
719719

720720
return {
721721
valid = true,
722-
ordinal = entry.line,
722+
ordinal = entry.text,
723723
display = make_display,
724724
filename = entry.filename,
725725
lnum = entry.lnum,
726-
line = entry.line,
726+
text = entry.text,
727727
}
728728
end
729729
end

0 commit comments

Comments
 (0)