Skip to content

Commit

Permalink
fix(ui): get_plugin should return when ui is not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 10, 2023
1 parent 18eb724 commit 5faadf6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/lazy/view/render.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ end
---@param row? number
---@return LazyPlugin?
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]
for _, loc in ipairs(self.locations) do
if row >= loc.from and row <= loc.to then
Expand Down

0 comments on commit 5faadf6

Please sign in to comment.