-;;; em-hist --- history list management
+;;; em-hist.el --- history list management
;; Copyright (C) 1999, 2000 Free Software Foundation
(ring-empty-p eshell-history-ring)
(not (string-equal (eshell-get-history 0) input))))
(eshell-put-history input))
- (setq eshell-save-history-index eshell-history-ring)
+ (setq eshell-save-history-index eshell-history-index)
(setq eshell-history-index nil))))
(defun eshell-read-history (&optional filename silent)
(if (null pos)
(error "Not found")
(setq eshell-history-index pos)
- (message "History item: %d" (- (ring-length eshell-history-ring) pos))
+ (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))
(insert-and-inherit (eshell-get-history pos)))))