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

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

[elpa] master ecff164 215/399: ivy.el (ivy-insert-current): Minor simpli


From: Oleh Krehel
Subject: [elpa] master ecff164 215/399: ivy.el (ivy-insert-current): Minor simplification
Date: Sat, 20 Jul 2019 14:57:26 -0400 (EDT)

branch: master
commit ecff1641958898dcf98b9645ecc8525a5f15e096
Author: Basil L. Contovounesios <address@hidden>
Commit: Basil L. Contovounesios <address@hidden>

    ivy.el (ivy-insert-current): Minor simplification
---
 ivy.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/ivy.el b/ivy.el
index 7da52fe..602fcf7 100644
--- a/ivy.el
+++ b/ivy.el
@@ -4154,13 +4154,11 @@ If the region is active, forward to `kill-ring-save' 
instead."
 Don't finish completion."
   (interactive)
   (delete-minibuffer-contents)
-  (insert
-   (if (and ivy--directory
-            (ivy--dirname-p (ivy-state-current ivy-last)))
-       (substring-no-properties
-        (ivy-state-current ivy-last) 0 -1)
-     (substring-no-properties
-      (ivy-state-current ivy-last)))))
+  (let ((end (and ivy--directory
+                  (ivy--dirname-p (ivy-state-current ivy-last))
+                  -1)))
+    (insert (substring-no-properties
+             (ivy-state-current ivy-last) 0 end))))
 
 (define-obsolete-variable-alias 'ivy--preferred-re-builders
     'ivy-preferred-re-builders "0.10.0")



reply via email to

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