fix: refine attempt_completion prompts (#2320)

This commit is contained in:
yetone
2025-06-24 19:15:49 +08:00
committed by GitHub
parent c48808b4a8
commit aa4fa9c89d
2 changed files with 3 additions and 1 deletions

View File

@@ -77,6 +77,8 @@ function M.func(opts, on_log, on_complete, session_ctx)
return { { line_, Highlights.INCOMING } }
end)
:totable()
local line_count = vim.api.nvim_buf_line_count(bufnr)
if opts.insert_line > line_count - 1 then opts.insert_line = line_count - 1 end
vim.api.nvim_buf_set_extmark(bufnr, ns_id, opts.insert_line, 0, {
virt_lines = virt_lines,
hl_eol = true,