From ceadb39c38753494867859afaaa323d79739f010 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 11 Mar 2024 16:25:17 +0100 Subject: [PATCH] Prevent text from wrapping in code actions menu (#9178) Right now we're basing the width of the menu on the longest code action title. That is only an approximation and doesn't always coincide perfectly with the true, longest code action. Given that it's pretty close, however, this commit simply disables text wrapping on the code action menu. Release Notes: - Fixed a rendering glitch that could cause code actions to not display correctly ([#8341](https://github.com/zed-industries/zed/issues/8341)) --- crates/editor/src/editor.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index fe5e81177a..e747d0d286 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -1196,6 +1196,7 @@ impl CodeActionsMenu { } }), ) + .whitespace_nowrap() // TASK: It would be good to make lsp_action.title a SharedString to avoid allocating here. .child(SharedString::from(action.lsp_action.title.clone())) })