Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ivy completing read compatibility for non-string defaults #1810

Closed
wants to merge 2 commits into from

Conversation

nxtr
Copy link
Contributor

@nxtr nxtr commented Nov 19, 2018

For non-string defaults, fix compat with `completing-read' to return the first element of default, if it is a list; "", if default is nil; or default
Also, fixes where previously a non-string default (symbol) cleared the collection

Fixes #1526

nxtr added 2 commits Nov 19, 2018
Preparation to allow non-string default values:

* Add only default string values to collection for completion
* Fix where previously a non-string default (symbol) cleared the collection
* Fix compat with `completing-read' to return the first element of
  default, if it is a list; "", if default is nil; or default
* ivy-test.el: Add relevant positive tests

Fixes  abo-abo#1526
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Nov 19, 2018

Thanks. Merged with minor changes. I wanted to keep the def in the argument list, since that's the same name as in completing-read. Please review.

@nxtr
Copy link
Contributor Author

@nxtr nxtr commented Nov 19, 2018

Makes sense, LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants