mark listing entry when details are visible
All checks were successful
tests / test (push) Successful in 10s

This commit is contained in:
2026-01-20 09:59:21 +01:00
parent 8c598002e4
commit 456a157549
4 changed files with 49 additions and 0 deletions

View File

@@ -1006,6 +1006,17 @@ describe("test-samurai core (no bundled runners)", function()
local detail_buf = vim.api.nvim_get_current_buf()
local detail_lines = vim.api.nvim_buf_get_lines(detail_buf, 0, -1, false)
assert.same({ "", "No output captured" }, detail_lines)
local selection_ns = vim.api.nvim_create_namespace("TestSamuraiListingSelection")
local marks = vim.api.nvim_buf_get_extmarks(listing_buf, selection_ns, 0, -1, { details = true })
assert.is_true(#marks > 0)
local highlighted = false
for _, mark in ipairs(marks) do
if mark[2] == target - 1 then
highlighted = true
break
end
end
assert.is_true(highlighted)
vim.fn.jobstart = orig_jobstart
end)