[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master b3ca886 133/272: counsel.el (counsel--generic): Improve

From: Oleh Krehel
Subject: [elpa] master b3ca886 133/272: counsel.el (counsel--generic): Improve
Date: Mon, 25 Apr 2016 10:13:21 +0000

branch: master
commit b3ca8860ecc8f52bbc30f432f56bd7a863814415
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    counsel.el (counsel--generic): Improve
 counsel.el |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/counsel.el b/counsel.el
index c531367..e6a2bad 100644
--- a/counsel.el
+++ b/counsel.el
@@ -250,11 +250,10 @@ Update the minibuffer with the amount of lines collected 
 (declare-function cider-sync-request:complete "ext:cider-client")
 (defun counsel--generic (completion-fn)
   "Complete thing at point with COMPLETION-FN."
-  (let* ((bnd (bounds-of-thing-at-point 'symbol))
-         (str (if bnd
-                  (buffer-substring-no-properties
-                   (car bnd) (cdr bnd))
-                ""))
+  (let* ((bnd (or (bounds-of-thing-at-point 'symbol)
+                  (cons (point) (point))))
+         (str (buffer-substring-no-properties
+               (car bnd) (cdr bnd)))
          (candidates (funcall completion-fn str))
          (ivy-height 7)
          (res (ivy-read (format "pattern (%s): " str)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]