Always wait for completion resolve before applying the completion edits (#18907)
After https://github.com/rust-lang/rust-analyzer/pull/18167 and certain people who type and complete rapidly, it turned out that we have not waited for `completionItem/resolve` to finish before applying the completion results. Release Notes: - Fixed completion items applied improperly on fast typing
This commit is contained in:
parent
f50bca7630
commit
a62a2fa8f7
8 changed files with 144 additions and 63 deletions
|
@ -387,7 +387,7 @@ mod test {
|
|||
lsp::ServerCapabilities {
|
||||
completion_provider: Some(lsp::CompletionOptions {
|
||||
trigger_characters: Some(vec![".".to_string(), ":".to_string()]),
|
||||
resolve_provider: Some(true),
|
||||
resolve_provider: Some(false),
|
||||
..Default::default()
|
||||
}),
|
||||
..Default::default()
|
||||
|
@ -432,7 +432,9 @@ mod test {
|
|||
request.next().await;
|
||||
cx.condition(|editor, _| editor.context_menu_visible())
|
||||
.await;
|
||||
cx.simulate_keystrokes("down enter ! escape");
|
||||
cx.simulate_keystrokes("down enter");
|
||||
cx.run_until_parked();
|
||||
cx.simulate_keystrokes("! escape");
|
||||
|
||||
cx.assert_state(
|
||||
indoc! {"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue