Skip to content

require-match and empty input #909

Closed
@Bad-ptr

Description

@Bad-ptr

Testcase:

(completing-read "Test: " () nil t)

With ivy enabled I can only abort with C-g, or C-u C-j. (more precisely I can not exit from minibuffer with exit-minibuffer and empty input)
With ivy disabled I can press RET and get "" result.
The emacs manual says:

However, empty input is always permitted, regardless of the value of require-match; in that case, completing-read returns the first element of default, if it is a list; "", if default is nil; or default.

Well I'm understand that this is a very rare case, but I'd like if ivy will be as much consistent with the standard completing-read as it is possible.
I have a code where I bind a key to the mb-local-map which allows me to exit(it calls exit-minibuffer) and restart completing-read with a different collection. Initially it may be empty collection. This works with standard completing-read, but not with ivy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions