From de653a636e5a420096829e393d6cc40f5bc545ac Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 30 Dec 2004 01:47:35 +0000 Subject: [PATCH] (eshell-previous-matching-input): Start the deletion from the end of the output. --- 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 f4bfea798e0..573d06337db 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -840,7 +840,7 @@ If N is negative, find the next or Nth next match." (unless (minibuffer-window-active-p (selected-window)) (message "History item: %d" (- (ring-length eshell-history-ring) pos))) ;; Can't use kill-region as it sets this-command - (delete-region (save-excursion (eshell-bol) (point)) (point)) + (delete-region eshell-last-output-end (point)) (insert-and-inherit (eshell-get-history pos))))) (defun eshell-next-matching-input (regexp arg) -- 2.39.5