emacs-diffs
[Top][All Lists]
Advanced

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

master 6d84853: eshell: Remove unnecessary check in em-hist


From: Lars Ingebrigtsen
Subject: master 6d84853: eshell: Remove unnecessary check in em-hist
Date: Wed, 26 Aug 2020 06:01:24 -0400 (EDT)

branch: master
commit 6d84853de8d4644fcce571e099a5b3443b62bfd4
Author: Brian Leung <leungbk@mailfence.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    eshell: Remove unnecessary check in em-hist
    
    * lisp/eshell/em-hist.el
    (eshell-previous-matching-input-string-position): Both before and
    within the while loop, n is always smaller than n (bug#43056).
    
    Copyright-paperwork-exempt: yes
---
 lisp/eshell/em-hist.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index 2679365..5cee1ba 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -862,7 +862,7 @@ Moves relative to START, or `eshell-history-index'."
       (setq prev n
            n (mod (+ n motion) len))
       ;; If we haven't reached a match, step some more.
-      (while (and (< n len) (not tried-each-ring-item)
+      (while (and (not tried-each-ring-item)
                  (not (string-match regexp (eshell-get-history n))))
        (setq n (mod (+ n motion) len)
              ;; If we have gone all the way around in this search.



reply via email to

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