File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -654,6 +654,7 @@ See the `\\[py-shell]' docs for additional warnings."
654654 (set-buffer pbuf)
655655 (let* ((start (point ))
656656 (goback (< start pmark))
657+ (goend (and (not goback) (= start (point-max ))))
657658 (buffer-read-only nil ))
658659 (goto-char pmark)
659660 (insert string)
@@ -670,14 +671,18 @@ See the `\\[py-shell]' docs for additional warnings."
670671 (if py-scroll-process-buffer
671672 (let* ((pop-up-windows t )
672673 (pwin (display-buffer pbuf)))
673- (set-window-point pwin (point ))))))
674- (set-buffer curbuf)
675- (if file-finished
676- (progn
677- (py-delete-file-silently (car py-file-queue))
678- (setq py-file-queue (cdr py-file-queue))
679- (if py-file-queue
680- (py-execute-file pyproc (car py-file-queue)))))))
674+ (set-window-point pwin (point )))))
675+ (set-buffer curbuf)
676+ (if file-finished
677+ (progn
678+ (py-delete-file-silently (car py-file-queue))
679+ (setq py-file-queue (cdr py-file-queue))
680+ (if py-file-queue
681+ (py-execute-file pyproc (car py-file-queue)))))
682+ (and goend
683+ (progn (set-buffer pbuf)
684+ (goto-char (point-max ))))
685+ )))
681686
682687(defun py-execute-buffer ()
683688 " Send the contents of the buffer to a Python interpreter.
You can’t perform that action at this time.
0 commit comments