# HG changeset patch
# User Richard M. Stallman <rms@gnu.org>
# Date 1104371255 0
# Node ID a2a95f34b949a9d34fac1fcad33deb3f1841cf29
# Parent  d299cf144f86e181321b993cf95da853b1ebdfc1
(eshell-previous-matching-input):
Start the deletion from the end of the output.

diff -r d299cf144f86 -r a2a95f34b949 lisp/eshell/em-hist.el
--- a/lisp/eshell/em-hist.el	Wed Dec 29 22:18:41 2004 +0000
+++ b/lisp/eshell/em-hist.el	Thu Dec 30 01:47:35 2004 +0000
@@ -840,7 +840,7 @@
       (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)