+2010-12-17 Leo <sdl.web@gmail.com>
+
+ * eshell/em-hist.el (eshell-previous-matching-input): Signal error
+ if point is not behind eshell-last-output-end (Bug#7585).
+
2010-12-16 Chong Yidong <cyd@stupidchicken.com>
* textmodes/rst.el (rst-compile-pdf-preview)
If N is negative, find the next or Nth next match."
(interactive (eshell-regexp-arg "Previous input matching (regexp): "))
(setq arg (eshell-search-arg arg))
+ (if (> eshell-last-output-end (point))
+ (error "Point not located after prompt"))
(let ((pos (eshell-previous-matching-input-string-position regexp arg)))
;; Has a match been found?
(if (null pos)
(setq eshell-history-index 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
+ ;; Can't use kill-region as it sets this-command
(delete-region eshell-last-output-end (point))
(insert-and-inherit (eshell-get-history pos)))))