[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fixing precision scrolling in terminal buffers
From: |
Po Lu |
Subject: |
Fixing precision scrolling in terminal buffers |
Date: |
Mon, 27 Dec 2021 13:45:13 +0800 |
Does anyone mind if I make the following change to term.el, so that
precision scrolling works correctly when point is at the end of process
output? Thanks.
diff --git a/lisp/term.el b/lisp/term.el
index e0a2f0a9a4..5961350ff9 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -3300,13 +3300,16 @@ term-goto-process-mark-maybe
`term-char-mode' to prevent commands from putting the buffer into
an inconsistent state by unexpectedly moving point.
-Mouse events are ignored so that mouse selection is unimpeded.
+Mouse and wheel events are ignored so that mouse selection and
+mouse wheel scrolling is unimpeded.
Only acts when the pre-command position of point was equal to the
process mark, and the `term-char-mode-point-at-process-mark'
option is enabled. See `term-set-goto-process-mark'."
(when term-goto-process-mark
- (unless (mouse-event-p last-command-event)
+ (unless (or (mouse-event-p last-command-event)
+ (memq (event-basic-type last-command-event)
+ '(wheel-down wheel-up)))
(goto-char (term-process-mark)))))
(defun term-process-mark ()
- Fixing precision scrolling in terminal buffers,
Po Lu <=