From: Steven Allen Date: Sat, 15 Feb 2020 23:13:59 +0000 (-0800) Subject: Skip shell prompt on current line in Eshell even if it's protected X-Git-Tag: emacs-27.0.90~34 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cd6a9b8f65;p=emacs.git Skip shell prompt on current line in Eshell even if it's protected When the eshell prompt is protected (e.g., with rear non-sticky, inhibited movements, etc.), 'beginning-of-line' won't move to the actual beginning of the line and therefore won't skip over the prompt. * lisp/eshell/em-prompt.el (eshell-previous-prompt): Use 'forward-line' to go to the beginning of the line, even if it's protected. (Bug#39627) --- diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el index 25b8ccaba17..9ae5ae12816 100644 --- a/lisp/eshell/em-prompt.el +++ b/lisp/eshell/em-prompt.el @@ -187,7 +187,7 @@ See `eshell-prompt-regexp'." "Move to end of Nth previous prompt in the buffer. See `eshell-prompt-regexp'." (interactive "p") - (beginning-of-line) ; Don't count prompt on current line. + (forward-line 0) ; Don't count prompt on current line. (eshell-next-prompt (- n))) (defun eshell-skip-prompt ()