Skip to content

Commit

Permalink
fix: previewer for builtin.builtin (#1583)
Browse files Browse the repository at this point in the history
  • Loading branch information
smhc authored Dec 10, 2021
1 parent 3f4ee6f commit 991d012
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/telescope/previewers/buffer_previewer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ previewers.builtin = defaulter(function(_)
end,

define_preview = function(self, entry, status)
local module_name = vim.fn.fnamemodify(entry.filename, ":t:r")
local module_name = vim.fn.fnamemodify(vim.fn.fnamemodify(entry.filename, ":h"), ":t")
local text
if entry.text:sub(1, #module_name) ~= module_name then
text = module_name .. "." .. entry.text
Expand Down

0 comments on commit 991d012

Please sign in to comment.