emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/ivy-hydra 412266f 038/395: swiper.el (swiper--line-at-p


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 412266f 038/395: swiper.el (swiper--line-at-point): Don't error on empty string
Date: Thu, 25 Feb 2021 08:31:26 -0500 (EST)

branch: externals/ivy-hydra
commit 412266f911b076497a995ea3f9fb03fec5be9792
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    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)



reply via email to

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