diff options
| author | Steven Allen | 2020-02-15 15:13:59 -0800 |
|---|---|---|
| committer | Eli Zaretskii | 2020-02-21 10:51:51 +0200 |
| commit | cd6a9b8f65c10c7f956c6b17fd3f806b61bb3199 (patch) | |
| tree | f440271645cb680266704b7aad4e20ce65fad125 | |
| parent | 9f0852474810311fd2b26fa3756ab6d816016389 (diff) | |
| download | emacs-cd6a9b8f65c10c7f956c6b17fd3f806b61bb3199.tar.gz emacs-cd6a9b8f65c10c7f956c6b17fd3f806b61bb3199.zip | |
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)
| -rw-r--r-- | lisp/eshell/em-prompt.el | 2 |
1 files changed, 1 insertions, 1 deletions
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'." | |||
| 187 | "Move to end of Nth previous prompt in the buffer. | 187 | "Move to end of Nth previous prompt in the buffer. |
| 188 | See `eshell-prompt-regexp'." | 188 | See `eshell-prompt-regexp'." |
| 189 | (interactive "p") | 189 | (interactive "p") |
| 190 | (beginning-of-line) ; Don't count prompt on current line. | 190 | (forward-line 0) ; Don't count prompt on current line. |
| 191 | (eshell-next-prompt (- n))) | 191 | (eshell-next-prompt (- n))) |
| 192 | 192 | ||
| 193 | (defun eshell-skip-prompt () | 193 | (defun eshell-skip-prompt () |