From ab789583ad8f6079374f4124e9e1a0858709eefd Mon Sep 17 00:00:00 2001 From: Markus <44006014+minosvasilias@users.noreply.github.com> Date: Thu, 30 Mar 2023 01:17:42 +0200 Subject: [PATCH] Clear state on failed insertion --- addons/copilot/Copilot.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/copilot/Copilot.gd b/addons/copilot/Copilot.gd index dad734e..3e8de7a 100644 --- a/addons/copilot/Copilot.gd +++ b/addons/copilot/Copilot.gd @@ -282,6 +282,8 @@ func _on_code_completion_received(completion, pre, post): remove_loading_indicator() if matches_request_state(pre, post): insert_completion(completion, pre, post) + else: + clear_highlights() func _on_code_completion_error(error): #Display error