diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2021-11-24 19:54:20 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2021-11-24 19:54:20 +0100 |
| commit | b74243e322bd40781f0bb66ecee2cda7700159c4 (patch) | |
| tree | 5c708740b87bfd91ad35981ade873373bd41702e | |
| parent | 248f5d849c48cd6bb7c60e4b46d75db848362602 (diff) | |
Fix preselect computation
| -rw-r--r-- | corfu.el | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -580,9 +580,10 @@ A scroll bar is displayed from LO to LO+BAR." (list base (length all) all hl corfu--metadata ;; Select the prompt when the input is a valid completion ;; and if it is not equal to the first candidate. - (if (and (not (equal field (car all))) - (not (and completing-file (equal (concat field "/") (car all)))) - (test-completion str table pred)) + (if (or (not all) + (and (not (equal field (car all))) + (not (and completing-file (equal (concat field "/") (car all)))) + (test-completion str table pred))) -1 0)))) (defun corfu--update-candidates (str pt table pred) |
