Skip to content

Commit

Permalink
ivy.el (ivy-completing-read): Fix require-match arg being symbol
Browse files Browse the repository at this point in the history
Do not cast them into boolean T values, since they change behaviour.

Fixes #2367
  • Loading branch information
Spenser Truex authored and abo-abo committed Dec 17, 2019
1 parent f8eb450 commit 9e7f21a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ivy.el
Original file line number Diff line number Diff line change
Expand Up @@ -2413,7 +2413,7 @@ This interface conforms to `completing-read' and can be used for
PROMPT is a string that normally ends in a colon and a space.
COLLECTION is either a list of strings, an alist, an obarray, or a hash table.
PREDICATE limits completion to a subset of COLLECTION.
REQUIRE-MATCH is a boolean value. See `completing-read'.
REQUIRE-MATCH is a boolean value or a symbol. See `completing-read'.
INITIAL-INPUT is a string inserted into the minibuffer initially.
HISTORY is a list of previously selected inputs.
DEF is the default value.
Expand All @@ -2440,7 +2440,8 @@ INHERIT-INPUT-METHOD is currently ignored."
(let ((str (ivy-read
prompt collection
:predicate predicate
:require-match (and collection require-match)
:require-match (when (and collection require-match)
require-match)
:initial-input (cond ((consp initial-input)
(car initial-input))
((and (stringp initial-input)
Expand Down

0 comments on commit 9e7f21a

Please sign in to comment.