[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-27 cd6a9b8 1/4: Skip shell prompt on current line in Eshell even i
From: |
Eli Zaretskii |
Subject: |
emacs-27 cd6a9b8 1/4: Skip shell prompt on current line in Eshell even if it's protected |
Date: |
Fri, 21 Feb 2020 04:04:12 -0500 (EST) |
branch: emacs-27
commit cd6a9b8f65c10c7f956c6b17fd3f806b61bb3199
Author: Steven Allen <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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)
---
lisp/eshell/em-prompt.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el
index 25b8cca..9ae5ae1 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 ()