fix: Ignore special buffers, fix auto-preview and not focus_on_open
This commit is contained in:
@@ -191,6 +191,10 @@ function Preview:show()
|
||||
return
|
||||
end
|
||||
|
||||
if not vim.api.nvim_win_is_valid(self.s.code.win) then
|
||||
return
|
||||
end
|
||||
|
||||
if not self.buf or not self.win then
|
||||
self:create()
|
||||
else
|
||||
@@ -289,6 +293,11 @@ function LivePreview:show()
|
||||
return
|
||||
end
|
||||
|
||||
if not vim.api.nvim_win_is_valid(self.s.code.win)
|
||||
or (self.codewin and not vim.api.nvim_win_is_valid(self.codewin)) then
|
||||
return
|
||||
end
|
||||
|
||||
local node = self.s:_current_node()
|
||||
if not node then
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user