From 5c3211e4663508eda68ebac77a677b397a81497b Mon Sep 17 00:00:00 2001 From: Paul Nelson Date: Sat, 6 Dec 2025 18:12:56 +0100 Subject: [PATCH] Honor ignored prefixes when clearing overlay * copilot.el (copilot--post-command): Consider 'this-original-command' when checking whether not to clear the overlay. Fixes #434: prefix commands like C-u were clearing the Copilot overlay even when their command symbols (e.g., 'universal-argument) were listed in 'copilot-clear-overlay-ignore-commands'. --- copilot.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/copilot.el b/copilot.el index c0d89a7..380592a 100644 --- a/copilot.el +++ b/copilot.el @@ -1223,6 +1223,9 @@ Copilot will show completions only if all predicates return t." (or (string-prefix-p "copilot-" (symbol-name this-command)) (member this-command copilot-clear-overlay-ignore-commands) + ;; `this-original-command' captures remapped helpers like + ;; `universal-argument-more' and `digit-argument'. + (member this-original-command copilot-clear-overlay-ignore-commands) (copilot--self-insert this-command))))) (copilot-clear-overlay) (when copilot--post-command-timer