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

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

[elpa] master c84b681 109/348: ivy.el (ivy-switch-buffer): Reset index t


From: Oleh Krehel
Subject: [elpa] master c84b681 109/348: ivy.el (ivy-switch-buffer): Reset index to 0 on input
Date: Sat, 8 Apr 2017 11:03:38 -0400 (EDT)

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

    ivy.el (ivy-switch-buffer): Reset index to 0 on input
    
    Since the reset is on input, "C-x b RET" can still be used to cycle the
    last two buffers.
    
    Otherwise, the behavior seems intuitive enough.
    
    Fixes #522
    Fixes #513
---
 ivy.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ivy.el b/ivy.el
index 4a02fcd..11e764b 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2399,6 +2399,9 @@ Prefix matches to NAME are put ahead of the list."
                   (cl-position
                    (concat re-str "/") cands
                    :test #'equal))
+             (and (eq caller 'ivy-switch-buffer)
+                  (> (length name) 0)
+                  0)
              (and (not (string= name ""))
                   (not (and (require 'flx nil 'noerror)
                             (eq ivy--regex-function 'ivy--regex-fuzzy)



reply via email to

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