From: Po Lu Date: Mon, 27 Dec 2021 09:55:23 +0000 (+0800) Subject: Fix precision scrolling inside terminal buffers X-Git-Tag: emacs-29.0.90~3417 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=caa1699264e583d9703dd47e6162c6386775915f;p=emacs.git Fix precision scrolling inside terminal buffers * lisp/term.el (term-goto-process-mark-maybe): Don't move point to process mark if the event is a vertical wheel event. --- diff --git a/lisp/term.el b/lisp/term.el index e0a2f0a9a4b..5961350ff9e 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -3300,13 +3300,16 @@ Called as a buffer-local `post-command-hook' function in `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 ()