From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <86jzbbf2ej.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16300"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Po Lu , 75333@debbugs.gnu.org To: Eason Huang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 04 08:46:25 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tTyrZ-000477-36 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jan 2025 08:46:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTyrE-0006SE-EK; Sat, 04 Jan 2025 02:46:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTyrD-0006S4-DN for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 02:46:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTyrD-0001AK-48 for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 02:46:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=uZZ8NaY6r4eT0v4jCpkVq5r9092xY+pRDe27XKMuSPQ=; b=cHKYKpdyIvTZ6fW66gHUMJ83Qj/Vq3pJfLiK1uQ6P7NoQF19tDPzPpXlOGIIC2xdlyZx7BpsPikH03PfbVWhTC97eBX81OR8pf2Yy57t0pi12Wpwyr7N5p9ahuihprPf80PxChmMzyXSBmDvTp9Wi1g7wvkNEtFEp4YnQyJT43KgJUI1H18vrYXiPu67HlPx+3rvgrJpRO1QSK0knnFsfNuDrXXlhff8zh4NRdkYHKEzwqXoVPjnvwcOKqD6wtWhMVIwXVM5QeM9KA7IvY1CVlthw0/8zAwka5cnZEXJ2tKVDV5lvdDl8Vu2PEsWBIrSf6jPyHU5Rg9HH+W9I89lcQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTyrB-0000ZF-QJ for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 02:46:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2025 07:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75333 X-GNU-PR-Package: emacs Original-Received: via spool by 75333-submit@debbugs.gnu.org id=B75333.17359767362114 (code B ref 75333); Sat, 04 Jan 2025 07:46:01 +0000 Original-Received: (at 75333) by debbugs.gnu.org; 4 Jan 2025 07:45:36 +0000 Original-Received: from localhost ([127.0.0.1]:53211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTyql-0000Y2-PY for submit@debbugs.gnu.org; Sat, 04 Jan 2025 02:45:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53602) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTyqj-0000Xo-37 for 75333@debbugs.gnu.org; Sat, 04 Jan 2025 02:45:34 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTyqd-00018Q-7N; Sat, 04 Jan 2025 02:45:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=uZZ8NaY6r4eT0v4jCpkVq5r9092xY+pRDe27XKMuSPQ=; b=ScPQM7LaM3vH JOxToGTlL1yDyYDZRgg8aNAkc0BQwxFHbjkMxaEVAnd4K6akVjHmoDs8oE4X1V3gnINT/EcRk27UT n/EnpZZfvSQVHLjSPDwAqvkuqlzEmGgX1BIOVd+4gL2oQLY9RJNxnsYuDnTfRefWixZdZTupiroEP HsY4FWdEBsMMBX3rp9FTHnF4Gs7lwmShFle2ydb44Fe/FOaRgudNMje1aQc/MTD/b0TwrzwRe0o4w Yc9qiNMDDs4WkcEin0vUWTEb3sWXwgvndpCvUa9FTxoDr6uRhMjF3sMmJjhYFgMF2h76jxuhuMNoC /FwGW3GH55keGfqROcIDrg==; In-Reply-To: (message from Eason Huang on Sat, 04 Jan 2025 08:50:04 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298332 Archived-At: > From: Eason Huang > 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