Fix error when using `spacemacs/counsel-search' wihout initial input.
This commit is contained in:
parent
f903460994
commit
d2d82e2312
|
@ -113,11 +113,12 @@ around point as the initial input. If DIR is non nil start in
|
||||||
that directory."
|
that directory."
|
||||||
(interactive)
|
(interactive)
|
||||||
(require 'counsel)
|
(require 'counsel)
|
||||||
(letf* ((initial-input (when use-initial-input
|
(letf* ((initial-input (if use-initial-input
|
||||||
(if (region-active-p)
|
(if (region-active-p)
|
||||||
(buffer-substring-no-properties
|
(buffer-substring-no-properties
|
||||||
(region-beginning) (region-end))
|
(region-beginning) (region-end))
|
||||||
(thing-at-point 'symbol t))))
|
(thing-at-point 'symbol t))
|
||||||
|
""))
|
||||||
(tool (catch 'tool
|
(tool (catch 'tool
|
||||||
(dolist (tool tools)
|
(dolist (tool tools)
|
||||||
(when (and (assoc-string tool spacemacs--counsel-commands)
|
(when (and (assoc-string tool spacemacs--counsel-commands)
|
||||||
|
|
Loading…
Reference in a new issue