mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-08-16 02:45:09 +00:00
fix: preview title key and a bug with dynamic_title (#1350)
This commit is contained in:
@@ -118,8 +118,6 @@ previewers.new_termopen_previewer = function(opts)
|
||||
|
||||
local opt_setup = opts.setup
|
||||
local opt_teardown = opts.teardown
|
||||
local opt_title = opts.title
|
||||
local opt_dyn_title = opts.dyn_title
|
||||
|
||||
local old_bufs = {}
|
||||
|
||||
@@ -155,24 +153,6 @@ previewers.new_termopen_previewer = function(opts)
|
||||
end
|
||||
end
|
||||
|
||||
function opts.title(self)
|
||||
if opt_title then
|
||||
if type(opt_title) == "function" then
|
||||
return opt_title(self)
|
||||
else
|
||||
return opt_title
|
||||
end
|
||||
end
|
||||
return "Preview"
|
||||
end
|
||||
|
||||
function opts.dyn_title(self, entry)
|
||||
if opt_dyn_title then
|
||||
return opt_dyn_title(self, entry)
|
||||
end
|
||||
return "Preview"
|
||||
end
|
||||
|
||||
function opts.setup(self)
|
||||
local state = {}
|
||||
if opt_setup then
|
||||
|
||||
Reference in New Issue
Block a user