From b7266ba31444be1932ff9c7666bc95551bd0ff7b Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Fri, 13 Mar 2026 14:28:48 -0600 Subject: [PATCH] Fix panic in crease folding (#51531) Fixes ZED-5BZ Release Notes: - N/A --- crates/project/src/lsp_command.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/project/src/lsp_command.rs b/crates/project/src/lsp_command.rs index 67edd6c13ca5a850a99f28dee849718d9e7ec9ae..ebc5ea038e0726384bc7d677f6fc6aa8ce87661e 100644 --- a/crates/project/src/lsp_command.rs +++ b/crates/project/src/lsp_command.rs @@ -4857,9 +4857,14 @@ impl LspCommand for GetFoldingRanges { self, message: proto::GetFoldingRangesResponse, _: Entity, - _: Entity, - _: AsyncApp, + buffer: Entity, + mut cx: AsyncApp, ) -> Result { + buffer + .update(&mut cx, |buffer, _| { + buffer.wait_for_version(deserialize_version(&message.version)) + }) + .await?; message .ranges .into_iter()