fix: preview title key and a bug with dynamic_title (#1350)

This commit is contained in:
Simon Hauser
2021-10-20 16:23:26 +02:00
committed by GitHub
parent adfbd616c6
commit a0835edd86
5 changed files with 37 additions and 60 deletions

View File

@@ -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