Skip to content

Commit

Permalink
consult--read: Disallow null completion only for require-match=t (Fix #…
Browse files Browse the repository at this point in the history
  • Loading branch information
minad committed Jan 23, 2024
1 parent e06292f commit 5240034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion consult.el
Original file line number Diff line number Diff line change
Expand Up @@ -2597,7 +2597,7 @@ PREVIEW-KEY are the preview keys."
;; Repair the null completion semantics. `completing-read' may return
;; an empty string even if REQUIRE-MATCH is non-nil. One can always
;; opt-in to null completion by passing the empty string for DEFAULT.
(when (and require-match (not default) (equal selected ""))
(when (and (eq require-match t) (not default) (equal selected ""))
(user-error "No selection"))
selected)))))

Expand Down

0 comments on commit 5240034

Please sign in to comment.