diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2022-12-22 00:23:56 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2022-12-22 00:26:14 +0100 |
| commit | d2549d2d20b0ae4b30dbcec5b28b9534c3503c28 (patch) | |
| tree | dc8bbf7fb589fe729016e4ed72e98e699cf70891 | |
| parent | 72e1409e27717ae5dc818cba9b0785e323032bb5 (diff) | |
Cleanuppreselect
| -rw-r--r-- | corfu.el | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -640,17 +640,13 @@ A scroll bar is displayed from LO to LO+BAR." (corfu--candidates . ,all) (corfu--total . ,(length all)) (corfu--highlight . ,hl) - ;; Select the prompt when the input is a valid completion and if it is not - ;; equal to the first candidate. This condition prevents jumping to prompt - ;; during completion for the full candidate when the incomplete candidate - ;; is invalid. (corfu--preselect . ,(if (or (eq corfu-preselect 'prompt) (not all) + (and completing-file (eq corfu-preselect 'directory) + (= (length corfu--base) (length str)) + (test-completion str table pred)) (and (eq corfu-preselect 'valid) (not (equal field (car all))) (not (and completing-file (equal (concat field "/") (car all)))) - (test-completion str table pred)) - (and completing-file (eq corfu-preselect 'directory) - (= (length corfu--base) (length str)) (test-completion str table pred))) -1 0))))) |
