branch: externals/ivy-hydra
commit 412266f911b076497a995ea3f9fb03fec5be9792
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
swiper.el (swiper--line-at-point): Don't error on empty string
---
swiper.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/swiper.el b/swiper.el
index 25f818f..bcab606 100644
--- a/swiper.el
+++ b/swiper.el
@@ -1556,8 +1556,10 @@ When not running `swiper-isearch' already, start it."
(let ((s (buffer-substring
(line-beginning-position)
(line-end-position))))
- (put-text-property 0 1 'point pt s)
- (ivy-cleanup-string s))))
+ (if (string= s "")
+ s
+ (put-text-property 0 1 'point pt s)
+ (ivy-cleanup-string s)))))
(defun swiper--isearch-highlight (str &optional current)
(let ((start 0)