From 6d84853de8d4644fcce571e099a5b3443b62bfd4 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Wed, 26 Aug 2020 12:01:14 +0200 Subject: [PATCH] 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 267936583e1..5cee1bad364 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. -- 2.39.2