mirror of https://github.com/folke/lazy.nvim.git
fix(ui): get_plugin should return when ui is not showing
This commit is contained in:
parent
18eb724dff
commit
5faadf6398
|
@ -91,6 +91,9 @@ end
|
||||||
---@param row? number
|
---@param row? number
|
||||||
---@return LazyPlugin?
|
---@return LazyPlugin?
|
||||||
function M:get_plugin(row)
|
function M:get_plugin(row)
|
||||||
|
if not (self.view.win and vim.api.nvim_win_is_valid(self.view.win)) then
|
||||||
|
return
|
||||||
|
end
|
||||||
row = row or vim.api.nvim_win_get_cursor(self.view.win)[1]
|
row = row or vim.api.nvim_win_get_cursor(self.view.win)[1]
|
||||||
for _, loc in ipairs(self.locations) do
|
for _, loc in ipairs(self.locations) do
|
||||||
if row >= loc.from and row <= loc.to then
|
if row >= loc.from and row <= loc.to then
|
||||||
|
|
Loading…
Reference in New Issue