Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

Commit d8fcbe9

Browse files
committed
wip: debug print
1 parent 39731a3 commit d8fcbe9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/rzls/virtual_document.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ function VirtualDocument:update_content()
7373
if self.buf then
7474
local buf_eol = utils.buffer_eol(self.buf)
7575
local lines = vim.fn.split(self.content, buf_eol, true)
76-
vim.api.nvim_buf_set_lines(self.buf, 0, -1, false, lines)
76+
local ok, _ = pcall(function()
77+
vim.api.nvim_buf_set_lines(self.buf, 0, -1, false, lines)
78+
end)
79+
if not ok then
80+
vim.print(vim.inspect({ content = self.content, lines = lines, eol = buf_eol }))
81+
end
7782
end
7883

7984
self.change_event:fire()

0 commit comments

Comments
 (0)