fix: crash in tags on enter for no results and random crash in previewer
This commit is contained in:
@@ -458,6 +458,9 @@ files.tags = function(opts)
|
|||||||
action_set.select:enhance {
|
action_set.select:enhance {
|
||||||
post = function()
|
post = function()
|
||||||
local selection = action_state.get_selected_entry()
|
local selection = action_state.get_selected_entry()
|
||||||
|
if not selection then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if selection.scode then
|
if selection.scode then
|
||||||
-- un-escape / then escape required
|
-- un-escape / then escape required
|
||||||
|
|||||||
@@ -386,6 +386,10 @@ previewers.new_buffer_previewer = function(opts)
|
|||||||
opts.define_preview(self, entry, status)
|
opts.define_preview(self, entry, status)
|
||||||
|
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
|
if not self or not self.state or not self.state.bufnr then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if vim.api.nvim_buf_is_valid(self.state.bufnr) then
|
if vim.api.nvim_buf_is_valid(self.state.bufnr) then
|
||||||
vim.api.nvim_buf_call(self.state.bufnr, function()
|
vim.api.nvim_buf_call(self.state.bufnr, function()
|
||||||
vim.cmd "do User TelescopePreviewerLoaded"
|
vim.cmd "do User TelescopePreviewerLoaded"
|
||||||
|
|||||||
Reference in New Issue
Block a user