mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
make vim.* functions local to display loop
This commit is contained in:
parent
c81fad2c1d
commit
df1fc3bb8b
@ -45,9 +45,12 @@ local frecency = function(opts)
|
|||||||
|
|
||||||
-- TODO: look into why this gets called so much
|
-- TODO: look into why this gets called so much
|
||||||
local make_display = function(entry)
|
local make_display = function(entry)
|
||||||
|
local bufnr = vim.fn.bufnr
|
||||||
|
local buf_is_loaded = vim.api.nvim_buf_is_loaded
|
||||||
|
|
||||||
local filename = entry.name
|
local filename = entry.name
|
||||||
|
|
||||||
local hl_filename = vim.api.nvim_buf_is_loaded(vim.fn.bufnr(filename)) and "TelescopeBufferLoaded" or ""
|
local hl_filename = buf_is_loaded(bufnr(filename)) and "TelescopeBufferLoaded" or ""
|
||||||
|
|
||||||
if opts.tail_path then
|
if opts.tail_path then
|
||||||
filename = utils.path_tail(filename)
|
filename = utils.path_tail(filename)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user