diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2021-10-17 15:22:56 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2021-10-17 15:22:56 +0200 |
| commit | 3e0e65f50a3060014d4b376a047607b8cf365032 (patch) | |
| tree | e343dfb90ab8a4baf7422020f32e9c848b23b533 | |
| parent | 676395fbb5784a50f54985026d76929daee8ee4c (diff) | |
Allow corfu-commit-predicate=nil
| -rw-r--r-- | corfu.el | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -68,7 +68,7 @@ (defcustom corfu-commit-predicate #'corfu-candidate-selected-p "Automatically commit if the predicate returns t." - :type 'function) + :type '(choice (const nil) function)) (defcustom corfu-quit-at-boundary nil "Automatically quit at completion field/word boundary. @@ -696,7 +696,7 @@ completion began less than that number of seconds ago." "Insert selected candidate unless command is marked to continue completion." (add-hook 'window-configuration-change-hook #'corfu-quit) (unless (corfu--match-symbol-p corfu-continue-commands this-command) - (if (funcall corfu-commit-predicate) + (if (and corfu-commit-predicate (funcall corfu-commit-predicate)) (corfu--insert 'exact) (setq corfu--index -1)))) |
