From e4fb0ed64bbb6c9d2609dc1b99beaa83efa86bcf Mon Sep 17 00:00:00 2001 From: Dongdong Zhou Date: Wed, 14 Sep 2022 20:05:34 +0100 Subject: [PATCH] don't update documentation if completion is inactive --- lapce-ui/src/completion.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lapce-ui/src/completion.rs b/lapce-ui/src/completion.rs index 8c05e8f3..cc54fec7 100644 --- a/lapce-ui/src/completion.rs +++ b/lapce-ui/src/completion.rs @@ -260,6 +260,10 @@ pub fn ensure_item_top_visible( } fn update_documentation(&mut self, data: &LapceTabData) { + if data.completion.status == CompletionStatus::Inactive { + return; + } + let documentation = if data.config.editor.completion_show_documentation { let current_item = (!data.completion.is_empty()) .then(|| data.completion.current_item());