aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-05-07 13:56:19 +0200
committerLars Ingebrigtsen2022-05-07 13:56:19 +0200
commitccec59f2b2c5344b10fa4b006bb5dc1c59555fb1 (patch)
tree136e52df1a5361df94ccbbc2b8b753e652521662 /lisp/progmodes/python.el
parent7952dcc23363b18f74203124d023b063bef359cf (diff)
downloademacs-ccec59f2b2c5344b10fa4b006bb5dc1c59555fb1.tar.gz
emacs-ccec59f2b2c5344b10fa4b006bb5dc1c59555fb1.zip
Improve inferior-python-mode scroll behaviour
* 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).
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 11ed732d282..825e94572a7 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2646,6 +2646,7 @@ banner and the initial prompt are received separately."
2646(defun python-comint-postoutput-scroll-to-bottom (output) 2646(defun python-comint-postoutput-scroll-to-bottom (output)
2647 "Faster version of `comint-postoutput-scroll-to-bottom'. 2647 "Faster version of `comint-postoutput-scroll-to-bottom'.
2648Avoids `recenter' calls until OUTPUT is completely sent." 2648Avoids `recenter' calls until OUTPUT is completely sent."
2649 (declare (obsolete nil "29.1")) ; Not used.
2649 (when (and (not (string= "" output)) 2650 (when (and (not (string= "" output))
2650 (python-shell-comint-end-of-output-p 2651 (python-shell-comint-end-of-output-p
2651 (ansi-color-filter-apply output))) 2652 (ansi-color-filter-apply output)))
@@ -2951,11 +2952,11 @@ variable.
2951 (setq-local comint-output-filter-functions 2952 (setq-local comint-output-filter-functions
2952 '(ansi-color-process-output 2953 '(ansi-color-process-output
2953 python-shell-comint-watch-for-first-prompt-output-filter 2954 python-shell-comint-watch-for-first-prompt-output-filter
2954 python-comint-postoutput-scroll-to-bottom
2955 comint-watch-for-password-prompt)) 2955 comint-watch-for-password-prompt))
2956 (setq-local comint-highlight-input nil) 2956 (setq-local comint-highlight-input nil)
2957 (setq-local compilation-error-regexp-alist 2957 (setq-local compilation-error-regexp-alist
2958 python-shell-compilation-regexp-alist) 2958 python-shell-compilation-regexp-alist)
2959 (setq-local scroll-conservatively 1)
2959 (add-hook 'completion-at-point-functions 2960 (add-hook 'completion-at-point-functions
2960 #'python-shell-completion-at-point nil 'local) 2961 #'python-shell-completion-at-point nil 'local)
2961 (define-key inferior-python-mode-map "\t" 2962 (define-key inferior-python-mode-map "\t"