summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/python.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 04542cdff3d..c9235129f98 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3569,7 +3569,9 @@ using that one instead of current buffer's process."
(forward-char (length (match-string-no-properties 0)))
(point))))
(end (point))
- (prompt-boundaries (python-util-comint-last-prompt))
+ (prompt-boundaries
+ (with-current-buffer (process-buffer process)
+ (python-util-comint-last-prompt)))
(prompt
(with-current-buffer (process-buffer process)
(when prompt-boundaries