diff --git a/elpy-shell.el b/elpy-shell.el index 4f5286f95..b8e038287 100644 --- a/elpy-shell.el +++ b/elpy-shell.el @@ -570,8 +570,13 @@ Prepends a continuation promt if PREPEND-CONT-PROMPT is set." (save-excursion (goto-char mark-point) (if prepend-cont-prompt - (let* ((column (+ (- (point) (progn (forward-line -1) (end-of-line) (point))) 1)) - (prompt (concat (make-string (max 0 (- column 7)) ? ) "...: ")) + (let* ((column (+ (- (point) + (let ((inhibit-field-text-motion t)) + (forward-line -1) + (end-of-line) + (point))) + 1)) + (prompt (concat (make-string (max 0 (- column 6)) ? ) "... ")) (lines (split-string string "\n"))) (goto-char mark-point) (elpy-shell--insert-and-font-lock diff --git a/test/elpy-shell-echo-inputs-and-outputs-test.el b/test/elpy-shell-echo-inputs-and-outputs-test.el index 3eaf39841..8854f0a1e 100644 --- a/test/elpy-shell-echo-inputs-and-outputs-test.el +++ b/test/elpy-shell-echo-inputs-and-outputs-test.el @@ -47,7 +47,7 @@ (with-current-buffer "*Python*" (elpy/wait-for-output "OK" 30) (buffer-string)))) - (should (string-match "...: a = 2\\+2" + (should (string-match "... a = 2\\+2" (with-current-buffer "*Python*" (buffer-string)))) ;; on "a = 2+2" @@ -68,7 +68,7 @@ (with-current-buffer "*Python*" (elpy/wait-for-output "OK" 30) (buffer-string)))) - (should (string-match "...: 4\\+3" + (should (string-match "... 4\\+3" (with-current-buffer "*Python*" (buffer-string)))) ;; on a portion of line "d=14"