Skip to content

Commit 44cd9c2

Browse files
committed
Meaningless test simplification in the sorry spec tests.
Meaningless in the sense that it still doesn't fix the "what the heck is happening" invalid buffer ID tests on nightly's semantic token highlighting.
1 parent b8c8a33 commit 44cd9c2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

spec/helpers.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,12 @@ end
160160

161161
---Wait a few seconds for line diagnostics, erroring if none arrive.
162162
function helpers.wait_for_line_diagnostics()
163+
local params = vim.lsp.util.make_position_params(0, 'utf-16')
163164
local succeeded, _ = vim.wait(15000, function()
164-
if progress.at(vim.lsp.util.make_position_params()) == progress.Kind.processing then
165+
if progress.at(params) == progress.Kind.processing then
165166
return false
166167
end
167-
local diagnostics = util.lean_lsp_diagnostics {
168-
lnum = vim.api.nvim_win_get_cursor(0)[1] - 1,
169-
}
168+
local diagnostics = util.lean_lsp_diagnostics { lnum = params.position.line }
170169
return #diagnostics > 0
171170
end)
172171
assert.message('Waited for line diagnostics but none came.').True(succeeded)

0 commit comments

Comments
 (0)