fix: preview title key and a bug with dynamic_title (#1350)
This commit is contained in:
@@ -277,8 +277,6 @@ previewers.new_buffer_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 = {}
|
||||
local bufname_table = {}
|
||||
@@ -316,24 +314,6 @@ previewers.new_buffer_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