fix error
This commit is contained in:
parent
162ab2d820
commit
761ef836cd
1 changed files with 3 additions and 2 deletions
|
|
@ -19,7 +19,8 @@ end
|
||||||
|
|
||||||
function M.debug_log(msg)
|
function M.debug_log(msg)
|
||||||
if conf.improved_debug and debug_bufnr then
|
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
|
else
|
||||||
if conf.debug then
|
if conf.debug then
|
||||||
vim.api.nvim_out_write("[chatgpt_nvim:debug] " .. msg .. "\n")
|
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
|
return chunks
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue