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))
This commit is contained in:
Antonio Scandurra 2024-03-11 16:25:17 +01:00 committed by GitHub
parent 2244419dfd
commit ceadb39c38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()))
})