Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lua/tiny-inline-diagnostic/highlights.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ end
function M.get_diagnostic_highlights(blend_factor, diag_ret, curline, index_diag)
local diag_hi, diag_inv_hi, body_hi = M.get_diagnostic_highlights_from_severity(diag_ret.severity)

local is_cursorline_enabled = vim.opt.cursorline:get()
local cursorline_is_visible = is_cursorline_visible()

if
(diag_ret.line and diag_ret.line == curline)
Expand All @@ -161,7 +161,7 @@ function M.get_diagnostic_highlights(blend_factor, diag_ret, curline, index_diag
(diag_ret.line and diag_ret.line ~= curline)
or index_diag > 1
or diag_ret.need_to_be_under
or not is_cursorline_enabled
or not cursorline_is_visible
then
diag_inv_hi = diag_inv_hi .. "NoBg"
end
Expand Down