editor: Revert flattening of code actions in mouse context menu (#28988)
In light of making context not move dynamically, reverting back these changes. - Doing it async will lead to a loading state, which moves the context menu. - Doing it sync introduces noticeable lag in opening the context menu. Future idea is to introduce fixed code actions like refactor, rewrite, etc depending on code action kind [(see more)](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionKind) which will use submenus. Release Notes: - N/A
This commit is contained in:
@@ -694,15 +694,7 @@ async fn test_collaborating_with_code_actions(
|
||||
// Confirming the code action will trigger a resolve request.
|
||||
let confirm_action = editor_b
|
||||
.update_in(cx_b, |editor, window, cx| {
|
||||
Editor::confirm_code_action(
|
||||
editor,
|
||||
&ConfirmCodeAction {
|
||||
item_ix: Some(0),
|
||||
from_mouse_context_menu: false,
|
||||
},
|
||||
window,
|
||||
cx,
|
||||
)
|
||||
Editor::confirm_code_action(editor, &ConfirmCodeAction { item_ix: Some(0) }, window, cx)
|
||||
})
|
||||
.unwrap();
|
||||
fake_language_server.set_request_handler::<lsp::request::CodeActionResolveRequest, _, _>(
|
||||
|
||||
Reference in New Issue
Block a user