unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eason Huang <aqua0210@foxmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Po Lu <luangruo@yahoo.com>, 75333@debbugs.gnu.org
Subject: bug#75333: 31.0.50; Feature-Request: Always keep cursor's position when pixel scrolling
Date: Sat, 04 Jan 2025 22:03:09 +0800	[thread overview]
Message-ID: <tencent_04A96DE083B7AD916EBACB35BF6895C0220A@qq.com> (raw)
In-Reply-To: <86jzbbf2ej.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Jan 2025 09:45:24 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Eason Huang <aqua0210@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
>

Hi Eli,

Thanks for your explanation, it make sense.

-- 
Eason Huang






      reply	other threads:[~2025-01-04 14:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-04  0:50 bug#75333: 31.0.50; Feature-Request: Always keep cursor's position when pixel scrolling Eason Huang
2025-01-04  7:45 ` Eli Zaretskii
2025-01-04 14:03   ` Eason Huang [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_04A96DE083B7AD916EBACB35BF6895C0220A@qq.com \
    --to=aqua0210@foxmail.com \
    --cc=75333@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).