emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master caa1699264: Fix precision scrolling inside terminal buffers


From: Po Lu
Subject: master caa1699264: Fix precision scrolling inside terminal buffers
Date: Mon, 27 Dec 2021 04:56:56 -0500 (EST)

branch: master
commit caa1699264e583d9703dd47e6162c6386775915f
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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.
---
 lisp/term.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

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 @@ 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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]