Skip to content

Commit

Permalink
ivy: Fix error on nil input with counsel search
Browse files Browse the repository at this point in the history
Fix issue syl20bnr#6499: SPC m (spacemacs/search-project-auto-region-or-symbol) on
a blank line causes an error:

    rxt-string->pcre: Wrong type argument: arrayp, nil

* layers/+completion/ivy/funcs.el (spacemacs/counsel-search): Check whether
initial-input is nil in order to avoid calling rxt-quote-pcre on a nil
value.
  • Loading branch information
Miciah committed Jul 8, 2018
1 parent 7c9f612 commit 2eb888d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layers/+completion/ivy/funcs.el
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ that directory."
spacemacs--counsel-search-max-path-length)
(length default-directory))))))
(spacemacs//make-counsel-search-function tool)
:initial-input (rxt-quote-pcre initial-input)
:initial-input (when initial-input (rxt-quote-pcre initial-input))
:dynamic-collection t
:history 'counsel-git-grep-history
:action #'counsel-git-grep-action
Expand Down

0 comments on commit 2eb888d

Please sign in to comment.