From 24ad97008bb1e44da16d52a5730993c329a55d21 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Fri, 28 Mar 2025 12:46:46 +0100 Subject: [PATCH] language server: Fix restarts sometimes not working for buffers open in go-to-definition view (#27655) Closes #ISSUE Release Notes: - Fixed language server restarts sometimes not restarting a language server. --- crates/collab/src/tests/following_tests.rs | 4 ++-- crates/project/src/lsp_store.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/collab/src/tests/following_tests.rs b/crates/collab/src/tests/following_tests.rs index 6a449dfd2f233ac476564ce5a1b1c9e68f646a06..a9ee27bff163b20747e93eea76d39ab3fe7db034 100644 --- a/crates/collab/src/tests/following_tests.rs +++ b/crates/collab/src/tests/following_tests.rs @@ -573,7 +573,7 @@ async fn test_following_tab_order( client_a .fs() .insert_tree( - "/a", + path!("/a"), json!({ "1.txt": "one", "2.txt": "two", @@ -581,7 +581,7 @@ async fn test_following_tab_order( }), ) .await; - let (project_a, worktree_id) = client_a.build_local_project("/a", cx_a).await; + let (project_a, worktree_id) = client_a.build_local_project(path!("/a"), cx_a).await; active_call_a .update(cx_a, |call, cx| call.set_location(Some(&project_a), cx)) .await diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs index 32b4c05841fce1c70eaa29007d9413c698f47284..b237e3c66138c09fe856e770d90e44c2320c9a2e 100644 --- a/crates/project/src/lsp_store.rs +++ b/crates/project/src/lsp_store.rs @@ -3891,7 +3891,7 @@ impl LspStore { *refcount += 1; } - if !ignore_refcounts || *refcount == 1 { + if ignore_refcounts || *refcount == 1 { local.register_buffer_with_language_servers(buffer, cx); } if !ignore_refcounts {