Commit 2fb1a7d2 authored by Barry Warsaw's avatar Barry Warsaw

(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.
parent 20088cdd
...@@ -654,6 +654,7 @@ See the `\\[py-shell]' docs for additional warnings." ...@@ -654,6 +654,7 @@ See the `\\[py-shell]' docs for additional warnings."
(set-buffer pbuf) (set-buffer pbuf)
(let* ((start (point)) (let* ((start (point))
(goback (< start pmark)) (goback (< start pmark))
(goend (and (not goback) (= start (point-max))))
(buffer-read-only nil)) (buffer-read-only nil))
(goto-char pmark) (goto-char pmark)
(insert string) (insert string)
...@@ -670,14 +671,18 @@ See the `\\[py-shell]' docs for additional warnings." ...@@ -670,14 +671,18 @@ See the `\\[py-shell]' docs for additional warnings."
(if py-scroll-process-buffer (if py-scroll-process-buffer
(let* ((pop-up-windows t) (let* ((pop-up-windows t)
(pwin (display-buffer pbuf))) (pwin (display-buffer pbuf)))
(set-window-point pwin (point)))))) (set-window-point pwin (point)))))
(set-buffer curbuf) (set-buffer curbuf)
(if file-finished (if file-finished
(progn (progn
(py-delete-file-silently (car py-file-queue)) (py-delete-file-silently (car py-file-queue))
(setq py-file-queue (cdr py-file-queue)) (setq py-file-queue (cdr py-file-queue))
(if py-file-queue (if py-file-queue
(py-execute-file pyproc (car 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 () (defun py-execute-buffer ()
"Send the contents of the buffer to a Python interpreter. "Send the contents of the buffer to a Python interpreter.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment