diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2021-11-26 00:04:49 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2021-11-26 00:04:49 +0100 |
| commit | ed4ef0fe1aed50494e59a9075566b72e8dfd3925 (patch) | |
| tree | 134189dc862ae21cdebcf7037f7455a8d8f6e318 | |
| parent | 04306ed116ab9ef92b822207e7adf494df0880ec (diff) | |
Remove overlay in pre-command-hook
| -rw-r--r-- | corfu.el | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -779,9 +779,6 @@ there hasn't been any input, then quit." (corfu--match-symbol-p corfu-continue-commands this-command)))) (corfu--echo-refresh) - (when corfu--preview-ov - (delete-overlay corfu--preview-ov) - (setq corfu--preview-ov nil)) (cond ;; XXX Guard against errors during candidate generation. ;; Turn off completion immediately if there are errors @@ -829,6 +826,9 @@ there hasn't been any input, then quit." (defun corfu--pre-command () "Insert selected candidate unless command is marked to continue completion." (add-hook 'window-configuration-change-hook #'corfu-quit) + (when corfu--preview-ov + (delete-overlay corfu--preview-ov) + (setq corfu--preview-ov nil)) (when (and corfu-commit-predicate (not (corfu--match-symbol-p corfu-continue-commands this-command)) (funcall corfu-commit-predicate)) |
