From: Po Lu <luangruo@yahoo.com>
To: emacs-devel@gnu.org
Subject: Fixing precision scrolling in terminal buffers
Date: Mon, 27 Dec 2021 13:45:13 +0800 [thread overview]
Message-ID: <87mtkm1tzq.fsf@yahoo.com> (raw)
In-Reply-To: 87mtkm1tzq.fsf.ref@yahoo.com
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 ()
next parent reply other threads:[~2021-12-27 5:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87mtkm1tzq.fsf.ref@yahoo.com>
2021-12-27 5:45 ` Po Lu [this message]
2021-12-27 9:09 ` Fixing precision scrolling in terminal buffers Phil Sainty
2021-12-27 9:14 ` Po Lu
2021-12-27 9:48 ` Phil Sainty
2021-12-27 9:54 ` Po Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mtkm1tzq.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.