Fix code actions run confusion (#32579)

Now if you click the triangle you get runnables, if you click the
lightning bolt you get code actions, if you trigger the code actions
menu with the mouse/keyboard you still get both.

Release Notes:

- Fixed the run/code actions menu to not duplicate content when opened
from the respective icons.

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This commit is contained in:
Conrad Irwin 2025-06-11 16:51:46 -06:00 committed by GitHub
parent 9032ea9849
commit 2a63c5f951
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 175 additions and 150 deletions

View file

@ -1401,7 +1401,9 @@ impl CodeActionsMenu {
fn origin(&self) -> ContextMenuOrigin {
match &self.deployed_from {
Some(CodeActionSource::Indicator(row)) => ContextMenuOrigin::GutterIndicator(*row),
Some(CodeActionSource::Indicator(row)) | Some(CodeActionSource::RunMenu(row)) => {
ContextMenuOrigin::GutterIndicator(*row)
}
Some(CodeActionSource::QuickActionBar) => ContextMenuOrigin::QuickActionBar,
None => ContextMenuOrigin::Cursor,
}