From f213aa5abe5aaf5fb35e2476721aec3f20c386fc Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Mon, 19 Aug 2024 20:35:37 +0200 Subject: [PATCH] fix: don't send lsp change events when opening or closing a file --- src/tui/editor.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tui/editor.zig b/src/tui/editor.zig index 49bf916..13da539 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -1226,7 +1226,7 @@ pub const Editor = struct { fn send_editor_update(self: *const Self, old_root: ?Buffer.Root, new_root: ?Buffer.Root) !void { _ = try self.handlers.msg(.{ "E", "update", token_from(new_root), token_from(old_root) }); - if (self.syntax) |_| if (self.file_path) |file_path| + if (self.syntax) |_| if (self.file_path) |file_path| if (old_root != null and new_root != null) project_manager.did_change(file_path, self.lsp_version, token_from(new_root), token_from(old_root)) catch {}; }