Skip to content

Commit

Permalink
ivy.el (ivy--completing-fname-p): Check that metadata is an alist
Browse files Browse the repository at this point in the history
  • Loading branch information
abo-abo committed Oct 25, 2021
1 parent 8b210d0 commit f0055ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ivy.el
Original file line number Diff line number Diff line change
Expand Up @@ -939,10 +939,10 @@ Is is a cons cell, related to `tramp-get-completion-function'."
:type '(alist :key-type symbol :value-type function))

(defun ivy--completing-fname-p ()
(eq 'file (cdr (assoc
'category
(ignore-errors
(funcall (ivy-state-collection ivy-last) ivy-text nil 'metadata))))))
(let ((meta (ignore-errors
(funcall (ivy-state-collection ivy-last) ivy-text nil 'metadata))))
(and (consp meta)
(eq 'file (cdr (assoc 'category meta))))))

(defun ivy-alt-done (&optional arg)
"Exit the minibuffer with the selected candidate.
Expand Down

0 comments on commit f0055ff

Please sign in to comment.