diff options
author | Barry Warsaw <barry@python.org> | 1995-07-05 22:27:23 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1995-07-05 22:27:23 (GMT) |
commit | e64bfee412ce8c7b737b255cf88f04411b2964eb (patch) | |
tree | 9d031c9c32d8d99ef0f85ef19012a7f57f5293b1 | |
parent | 6e98f3350f2ea838a487bde43115923477c74d49 (diff) | |
download | cpython-e64bfee412ce8c7b737b255cf88f04411b2964eb.zip cpython-e64bfee412ce8c7b737b255cf88f04411b2964eb.tar.gz cpython-e64bfee412ce8c7b737b255cf88f04411b2964eb.tar.bz2 |
(py-process-filter): if command takes a long time, input typed before
the next prompt could end up in the middle of the line, instead of
after it. Fix given by klm@nist.gov.
-rw-r--r-- | Misc/python-mode.el | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el index 0b6383b..a40bb27 100644 --- a/Misc/python-mode.el +++ b/Misc/python-mode.el @@ -654,6 +654,7 @@ See the `\\[py-shell]' docs for additional warnings." (set-buffer pbuf) (let* ((start (point)) (goback (< start pmark)) + (goend (and (not goback) (= start (point-max)))) (buffer-read-only nil)) (goto-char pmark) (insert string) @@ -670,14 +671,18 @@ See the `\\[py-shell]' docs for additional warnings." (if py-scroll-process-buffer (let* ((pop-up-windows t) (pwin (display-buffer pbuf))) - (set-window-point pwin (point)))))) - (set-buffer curbuf) - (if file-finished - (progn - (py-delete-file-silently (car py-file-queue)) - (setq py-file-queue (cdr py-file-queue)) - (if py-file-queue - (py-execute-file pyproc (car py-file-queue))))))) + (set-window-point pwin (point))))) + (set-buffer curbuf) + (if file-finished + (progn + (py-delete-file-silently (car py-file-queue)) + (setq py-file-queue (cdr py-file-queue)) + (if py-file-queue + (py-execute-file pyproc (car py-file-queue))))) + (and goend + (progn (set-buffer pbuf) + (goto-char (point-max)))) + ))) (defun py-execute-buffer () "Send the contents of the buffer to a Python interpreter. |