Skip to content

Commit f06ffde

Browse files
authored
feat: ensure the new logic is used for the cursorline visibility check (#166)
in a previous commit, the logic was changed from simply checking the cursorline option to also considering the related cursorlineopt option to verify that the full cursorline is drawn. there is unfortunately one more spot in the code i've missed
1 parent 62ec4a5 commit f06ffde

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lua/tiny-inline-diagnostic/highlights.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ end
144144
function M.get_diagnostic_highlights(blend_factor, diag_ret, curline, index_diag)
145145
local diag_hi, diag_inv_hi, body_hi = M.get_diagnostic_highlights_from_severity(diag_ret.severity)
146146

147-
local is_cursorline_enabled = vim.opt.cursorline:get()
147+
local cursorline_is_visible = is_cursorline_visible()
148148

149149
if
150150
(diag_ret.line and diag_ret.line == curline)
@@ -161,7 +161,7 @@ function M.get_diagnostic_highlights(blend_factor, diag_ret, curline, index_diag
161161
(diag_ret.line and diag_ret.line ~= curline)
162162
or index_diag > 1
163163
or diag_ret.need_to_be_under
164-
or not is_cursorline_enabled
164+
or not cursorline_is_visible
165165
then
166166
diag_inv_hi = diag_inv_hi .. "NoBg"
167167
end

0 commit comments

Comments
 (0)