Skip to content

Commit

Permalink
fix(section): dont trigger on invalid buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 30, 2024
1 parent 4d95366 commit 29ee890
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/trouble/view/section.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ function M:listen()
if not this.opts.auto_refresh then
return
end
if not vim.api.nvim_buf_is_valid(e.buf) then
return
end
if event.main then
local main = this:main()
if main and main.buf ~= e.buf then
Expand Down

0 comments on commit 29ee890

Please sign in to comment.