If completion arrives after we already stopped editing, ignore it
This commit is contained in:
parent
acaf22d005
commit
2a92dd8d4d
@ -3161,6 +3161,12 @@ fn completion(cx: &mut Context) {
|
|||||||
move |editor: &mut Editor,
|
move |editor: &mut Editor,
|
||||||
compositor: &mut Compositor,
|
compositor: &mut Compositor,
|
||||||
response: Option<lsp::CompletionResponse>| {
|
response: Option<lsp::CompletionResponse>| {
|
||||||
|
let (_, doc) = current!(editor);
|
||||||
|
if doc.mode() != Mode::Insert {
|
||||||
|
// we're not in insert mode anymore
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let items = match response {
|
let items = match response {
|
||||||
Some(lsp::CompletionResponse::Array(items)) => items,
|
Some(lsp::CompletionResponse::Array(items)) => items,
|
||||||
// TODO: do something with is_incomplete
|
// TODO: do something with is_incomplete
|
||||||
|
Loading…
Reference in New Issue
Block a user