1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00

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)
This commit is contained in:
Steven Allen 2020-02-15 15:13:59 -08:00 committed by Eli Zaretskii
parent 9f08524748
commit cd6a9b8f65

View File

@ -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 ()