chore: fix types (#173)

This commit is contained in:
yetone
2024-08-23 18:33:49 +08:00
committed by GitHub
parent 7d4be712f0
commit 25f8175662
2 changed files with 12 additions and 1 deletions

View File

@@ -1165,6 +1165,10 @@ Available commands:
start_line = tonumber(start_line)
---@cast end_line integer
end_line = tonumber(end_line)
if end_line == nil then
Utils.error("Invalid end line number", { once = true, title = "Avante" })
return
end
selected_code_content_with_line_numbers = prepend_line_number(
table.concat(api.nvim_buf_get_lines(self.code.bufnr, start_line - 1, end_line, false), "\n"),
start_line