Skip to content

Commit

Permalink
fix(views): pending should be considered open. Fixes #492
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 10, 2024
1 parent 4d0f045 commit 57b50a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/trouble/view/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ function M.get(filter)
local ret = {}
for view, idx in pairs(M._views) do
local is_open = view.win:valid()
local ok = is_open or view.opts.auto_open or view.first_update:is_pending()
local opening = view.first_update:is_pending()
local ok = is_open or view.opts.auto_open or opening
ok = ok and (not filter.mode or filter.mode == view.opts.mode)
ok = ok and (not filter.open or is_open)
ok = ok and (not filter.open or is_open or opening)
if ok then
ret[#ret + 1] = {
idx = idx,
Expand Down

0 comments on commit 57b50a6

Please sign in to comment.