GNU bug report logs - #75333
31.0.50; Feature-Request: Always keep cursor's position when pixel scrolling

Previous Next

Package: emacs;

Reported by: Eason Huang <aqua0210 <at> foxmail.com>

Date: Sat, 4 Jan 2025 00:52:02 UTC

Severity: wishlist

Found in version 31.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eason Huang <aqua0210 <at> foxmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 75333 <at> debbugs.gnu.org
Subject: bug#75333: 31.0.50; Feature-Request: Always keep cursor's position when pixel scrolling
Date: Sat, 04 Jan 2025 09:45:24 +0200
> From: Eason Huang <aqua0210 <at> foxmail.com>
> Date: Sat, 04 Jan 2025 08:50:04 +0800
> 
> 
> Recently, when the cursor is inside the screen, it's positon will not
> move when pixel scrolling. But when the cursor touching the bording of
> window, it's position begin to change.
> 
> expected:
> 
> 1. when the cursor(line) is closed to the border of window, partially-visible
> the cursor
> 2. when the cursor(line) is outside the window, hide the cursor
> 3. wehn the cursor(line) is inside the window, show the cursor again
> 
> Or there already an option to enable this feature?
> 
> As I known, Apple Xcode and Microsoft Word have the same behavior as
> describe above.

Unlike other editors, Emacs' display engine was designed with the
explicit requirement that the position of point (what you call
"cursor") is always visible in the window.  So when the window is
scrolled for some reason, Emacs moves point to bring it back into the
visible portion of the window.  This behavior is coded and assumed all
over the place, and is hard to change.  There's therefore no option
for the behavior you expect.

There was an effort in the past to provide such behavior as an option,
but AFAIR it wasn't completed.  We did discuss some of the
consequences of such behavior and identified some problematic
decisions which will need to be made in various situations (e.g., what
should happen when point is outside of the window and the user runs
some command which modifies the buffer?), and I personally consider
those issues we considered to be the tip of a very large iceberg.  See
this discussion:

  https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg00328.html




This bug report was last modified 80 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.