emacs-devel
[Top][All Lists]
Advanced

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

Re: Fixing precision scrolling in terminal buffers


From: Po Lu
Subject: Re: Fixing precision scrolling in terminal buffers
Date: Mon, 27 Dec 2021 17:14:29 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Phil Sainty <psainty@orcon.net.nz> writes:

> So some comments/questions:
>
> 1. It sounds like this change should actually use `mouse-wheel-up-event'
>    and `mouse-wheel-down-event'?

The precision scrolling code doesn't work with mouse-4 and mouse-5
events, as they are only generated by ttys and the Core Input code, both
of which don't provide pixel deltas.  (The manual you want is the Lisp
reference manual for Emacs 29: yours is too old to describe this.)

> 2. Is the problem actually that `mouse-wheel-mode' isn't handling this
>    in terminals the way it does in GUIs?  I'm not sure what's supposed
>    to happen -- I'm not sure I've ever used a mouse wheel when running
>    Emacs inside a terminal before now, but what I observe is that in a
>    *terminal* buffer the mouse wheel cycles the shell command history
>    in terminal frames, but scrolls the window in GUI frames.

No, you have to turn on (for example) xterm-mouse-mode for the mouse
wheel to work properly in supported terminals.  My theory for why
scrolling used to work is that the scroll functions force the window
start, and post-command-hook is run before redisplay has a chance to, so
it can't move the point outside the visible area without it being moved
back in by redisplay.  However, the precision scrolling code can't force
start, as that resets vscroll.

Thanks.


reply via email to

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