ivy.el: Make prompt line selectable #1059
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to make selecting a custom input more intuitive by letting the user select the prompt line, as suggested by @Stebalien in #933 (comment).
Calling
ivy-done
(C-m
) orivy-alt-done
(C-j
) on a selected prompt exits with the current user input and is thus equivalent to callingivy-immediate-done
(C-M-j
) when any candidate is selected. Therefore, rememberingC-M-j
is not necessary anymore. If no candidate matches the current input, the prompt line is selected automatically, as this is the only option left for the user.To activate this behaviour, set the new variable
ivy-use-selectable-prompt
tot
. Note that selecting the prompt line is not possible ifivy-read
is called with predicate:require-match
set tot
, since a custom input is not allowed in this case. Customize faceivy-prompt-match
to adjust the look of the selected prompt if you want it to differ from a selected candidate.