Skip to content

Commit

Permalink
fix(preview): set correct extmark priorities in preview highlight. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 3, 2024
1 parent abdfa1d commit 13ad959
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/trouble/view/preview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ function M.open(view, item, opts)
M.preview = M.preview_win(buf, view)

M.preview.buf = buf
M.preview.item = item
end
M.preview.item = item

Render.reset(M.preview.buf)

Expand All @@ -111,6 +111,7 @@ function M.open(view, item, opts)
hl_group = "CursorLine",
hl_eol = true,
strict = false,
priority = 150,
})

-- highlight the range
Expand All @@ -119,6 +120,7 @@ function M.open(view, item, opts)
end_col = end_pos[2],
hl_group = "TroublePreview",
strict = false,
priority = 160,
})

-- no autocmds should be triggered. So LSP's etc won't try to attach in the preview
Expand Down

0 comments on commit 13ad959

Please sign in to comment.