fix error

This commit is contained in:
2024-12-30 00:02:28 +01:00
parent 162ab2d820
commit 761ef836cd

View File

@@ -19,7 +19,8 @@ end
function M.debug_log(msg)
if conf.improved_debug and debug_bufnr then
vim.api.nvim_buf_set_lines(debug_bufnr, -1, -1, false, { msg })
local lines = vim.split(msg, "\n")
vim.api.nvim_buf_set_lines(debug_bufnr, -1, -1, false, lines)
else
if conf.debug then
vim.api.nvim_out_write("[chatgpt_nvim:debug] " .. msg .. "\n")
@@ -112,4 +113,4 @@ function M.chunkify(text, estimate_tokens_fn, token_limit)
return chunks
end
return M
return M