From 4ae6f08a33647e7a0d6d8c3ae20214dc86ecda48 Mon Sep 17 00:00:00 2001 From: MeanderingProgrammer Date: Sun, 20 Oct 2024 13:25:13 -0700 Subject: [PATCH] feat: trigger TextChanged event after updating buffer --- lua/chatgpt/flows/chat/base.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/chatgpt/flows/chat/base.lua b/lua/chatgpt/flows/chat/base.lua index 0ce51ec..97aba91 100644 --- a/lua/chatgpt/flows/chat/base.lua +++ b/lua/chatgpt/flows/chat/base.lua @@ -580,6 +580,7 @@ function Chat:set_lines(start_idx, end_idx, strict_indexing, lines) if not self.is_streaming_response_lock then Utils.modify_buf(self.chat_window.bufnr, function(bufnr) vim.api.nvim_buf_set_lines(bufnr, start_idx, end_idx, strict_indexing, lines) + vim.api.nvim_exec_autocmds("TextChanged", { buffer = bufnr }) end) end end