From e5115b4435a865d1c6074c58c067da50c6d05706 Mon Sep 17 00:00:00 2001
From: Jan Steinke <jan.steinke@gmail.com>
Date: Tue, 9 Apr 2024 22:52:23 +0200
Subject: [PATCH] reset to original

---
 lua/lsp-preview/diff.lua | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lua/lsp-preview/diff.lua b/lua/lsp-preview/diff.lua
index 7032c77..34dce66 100644
--- a/lua/lsp-preview/diff.lua
+++ b/lua/lsp-preview/diff.lua
@@ -308,6 +308,9 @@ function M.make_apply_func(workspace_edit, offset_encoding, orig_apply_workspace
 			workspace_edit.changes = compactChanges(changes)
 		end
 		orig_apply_workspace_edits(workspace_edit, offset_encoding)
+		-- Reset it to the original
+		---@diagnostic disable-next-line: duplicate-set-field
+		require("vim.lsp.util").apply_workspace_edit = orig_apply_workspace_edits
 	end
 end