Skip to content

Commit 5c3211e

Browse files
committed
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'.
1 parent 8e43edf commit 5c3211e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

copilot.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,9 @@ Copilot will show completions only if all predicates return t."
12231223
(or
12241224
(string-prefix-p "copilot-" (symbol-name this-command))
12251225
(member this-command copilot-clear-overlay-ignore-commands)
1226+
;; `this-original-command' captures remapped helpers like
1227+
;; `universal-argument-more' and `digit-argument'.
1228+
(member this-original-command copilot-clear-overlay-ignore-commands)
12261229
(copilot--self-insert this-command)))))
12271230
(copilot-clear-overlay)
12281231
(when copilot--post-command-timer

0 commit comments

Comments
 (0)