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

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

[elpa] master 6768214 221/399: ivy.el (ivy--insert-symbol-boundaries): E


From: Oleh Krehel
Subject: [elpa] master 6768214 221/399: ivy.el (ivy--insert-symbol-boundaries): Extract
Date: Sat, 20 Jul 2019 14:57:27 -0400 (EDT)

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

    ivy.el (ivy--insert-symbol-boundaries): Extract
---
 ivy.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/ivy.el b/ivy.el
index e97ac25..46f7856 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1372,6 +1372,13 @@ Call the permanent action if possible."
   (move-end-of-line 1)
   (ivy--maybe-scroll-history))
 
+(defun ivy--insert-symbol-boundaries ()
+  (undo-boundary)
+  (beginning-of-line)
+  (insert "\\_<")
+  (end-of-line)
+  (insert "\\_>"))
+
 (defun ivy-next-history-element (arg)
   "Forward to `next-history-element' with ARG."
   (interactive "p")
@@ -1385,11 +1392,7 @@ Call the permanent action if possible."
                    (not (ffap-url-p ivy--default))
                    (not (ivy-state-dynamic-collection ivy-last))
                    (> (point) (minibuffer-prompt-end)))
-          (undo-boundary)
-          (insert "\\_>")
-          (goto-char (minibuffer-prompt-end))
-          (insert "\\_<")
-          (forward-char (+ 2 (length ivy--default)))))
+          (ivy--insert-symbol-boundaries)))
     (next-history-element arg))
   (ivy--cd-maybe)
   (move-end-of-line 1)



reply via email to

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