]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve inferior-python-mode scroll behaviour
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 7 May 2022 11:56:19 +0000 (13:56 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 7 May 2022 11:56:19 +0000 (13:56 +0200)
* lisp/progmodes/python.el (inferior-python-mode): Use
scroll-convervatively instead of trying to do this with a comint
filter (which produces flickering) (bug#31115).

lisp/progmodes/python.el

index 11ed732d282087a1674dacb96a0fa4afe2892d52..825e94572a76a316de6e5a377f69705881c1474a 100644 (file)
@@ -2646,6 +2646,7 @@ banner and the initial prompt are received separately."
 (defun python-comint-postoutput-scroll-to-bottom (output)
   "Faster version of `comint-postoutput-scroll-to-bottom'.
 Avoids `recenter' calls until OUTPUT is completely sent."
+  (declare (obsolete nil "29.1")) ; Not used.
   (when (and (not (string= "" output))
              (python-shell-comint-end-of-output-p
               (ansi-color-filter-apply output)))
@@ -2951,11 +2952,11 @@ variable.
   (setq-local comint-output-filter-functions
               '(ansi-color-process-output
                 python-shell-comint-watch-for-first-prompt-output-filter
-                python-comint-postoutput-scroll-to-bottom
                 comint-watch-for-password-prompt))
   (setq-local comint-highlight-input nil)
   (setq-local compilation-error-regexp-alist
               python-shell-compilation-regexp-alist)
+  (setq-local scroll-conservatively 1)
   (add-hook 'completion-at-point-functions
             #'python-shell-completion-at-point nil 'local)
   (define-key inferior-python-mode-map "\t"