all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: emacs-devel@gnu.org
Subject: Re: Fixing precision scrolling in terminal buffers
Date: Mon, 27 Dec 2021 17:14:29 +0800	[thread overview]
Message-ID: <87zgomz9xm.fsf@yahoo.com> (raw)
In-Reply-To: <068b41819a06bade1b13ea97560a6d82@webmail.orcon.net.nz> (Phil Sainty's message of "Mon, 27 Dec 2021 22:09:58 +1300")

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	other threads:[~2021-12-27  9:14 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 ` Fixing precision scrolling in terminal buffers Po Lu
2021-12-27  9:09   ` Phil Sainty
2021-12-27  9:14     ` Po Lu [this message]
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=87zgomz9xm.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=emacs-devel@gnu.org \
    --cc=psainty@orcon.net.nz \
    /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.