comparison lisp/eshell/em-hist.el @ 37323:11b33211a908

(eshell-previous-matching-input): Don't display "History item" if the the minibuffer is active.
author John Wiegley <johnw@newartisans.com>
date Wed, 11 Apr 2001 15:49:31 +0000
parents 8e57189d61b4
children 08f6bad878f8
comparison
equal deleted inserted replaced
37322:d27be94466e0 37323:11b33211a908
814 (let ((pos (eshell-previous-matching-input-string-position regexp arg))) 814 (let ((pos (eshell-previous-matching-input-string-position regexp arg)))
815 ;; Has a match been found? 815 ;; Has a match been found?
816 (if (null pos) 816 (if (null pos)
817 (error "Not found") 817 (error "Not found")
818 (setq eshell-history-index pos) 818 (setq eshell-history-index pos)
819 (message "History item: %d" (- (ring-length eshell-history-ring) pos)) 819 (unless (minibuffer-window-active-p (selected-window))
820 (message "History item: %d" (- (ring-length eshell-history-ring) pos)))
820 ;; Can't use kill-region as it sets this-command 821 ;; Can't use kill-region as it sets this-command
821 (delete-region (save-excursion (eshell-bol) (point)) (point)) 822 (delete-region (save-excursion (eshell-bol) (point)) (point))
822 (insert-and-inherit (eshell-get-history pos))))) 823 (insert-and-inherit (eshell-get-history pos)))))
823 824
824 (defun eshell-next-matching-input (regexp arg) 825 (defun eshell-next-matching-input (regexp arg)