fix: resolve LSP sync error when setting buffer lines (#2290)

This commit is contained in:
yetone
2025-06-21 21:16:55 +08:00
committed by GitHub
parent 92460fab6a
commit 86743a1d7d
2 changed files with 2 additions and 2 deletions

View File

@@ -161,7 +161,7 @@ function Selection:submit_input(input)
response_lines[i] = original_first_line_indentation .. line
end
end
api.nvim_buf_set_lines(self.code_bufnr, start_line - 1, finish_line, true, response_lines)
pcall(function() api.nvim_buf_set_lines(self.code_bufnr, start_line - 1, finish_line, true, response_lines) end)
finish_line = start_line + #response_lines - 1
end