From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Redisplay resets vscroll when window start changes Date: Mon, 15 Nov 2021 20:39:50 +0800 Message-ID: <87k0h9pp7t.fsf@yahoo.com> References: <87k0h9pp7t.fsf.ref@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4858"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 15 13:44:56 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mmbM0-00018E-Cd for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Nov 2021 13:44:56 +0100 Original-Received: from localhost ([::1]:40726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmbLz-00040o-3f for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Nov 2021 07:44:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmbHJ-0001AD-Uo for emacs-devel@gnu.org; Mon, 15 Nov 2021 07:40:06 -0500 Original-Received: from sonic307-56.consmr.mail.ne1.yahoo.com ([66.163.190.31]:41335) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmbHH-0002o5-1y for emacs-devel@gnu.org; Mon, 15 Nov 2021 07:40:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1636980000; bh=BpW1nalF8Z2ehBn4WJvftUf9UEmIR2biau6VmnCHRs0=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=pWuSyAJ7TdZxGhLANuB7wCD8ajkN/RMkem9u3WmhF/UNUCqLZgx6dqPiHoDoF65MZyjTzh0UHwqB28StHZrhk+E0raNjYL+Mx1HoGM8x25V56JOZIkUXnyXIU8OaVT8rSXucQclZdwmwQSgAXX6fajMIZT8alVj3AJwu53Sdox/OGnQAyxqhbOK+IC/Wg97MpwO+lueQWTsXJ258htnmmsZ+JDntzuJ+cJsisUgkZ+Pk4ABlXFHQG/Sk4HZ5rfncW3YoJAgz2cLb5XyFmFzbDCReloeP78vzKlQi3ITu9b0e9EHZZzDZH4A7Ao8b6Biz5l4TU3Rk03WvcxPiACeotA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1636980000; bh=isBBOBwrwRRIzJ1QvvXLjiN8HhPuBfGfujJ7NNYddyz=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Nisi02B82zsnPkGrmycTAZ9Jd4giu3rjuUERkFDOTHv6PszvTTvZpNpcXT7zZCrrDUDRamy2rhYj2D+c7mmUVgUDLiRDxhN64JNyEdvSPgCNM0ZgeJPqSt80IIMe5bjZX7rZFDrGNECmUS7iwza20CioWq24ohoCaUz+M6DwYLlcpwSj+Xoso3AZXRJ8bJej2exL+Ut0H6RV47kUaHvD/fo7JPAdZRGfE/r3FGiinMI72BGlToB+2Laf6k0HXrC4ycd3la8v6t6ZCXZqbZ9EJFn89xo1GniOr54kJgVNDreTfkKOQ7WBf9JERTpkMzqDLPoXB8w2rdPEN5t+2yqZeA== X-YMail-OSG: R_Dqn3oVM1kmZV0O0ZfEAXkDk7mwj6B7cfgWMAKJBzK3saVqsWKiX6SowpAm5Py .9sgx.1qrp40BKyBvxRGskwxK86ay4v3EB1BKWrEveZ8HWHheCZJq0Orxc7O1prEItejF911lcKy T6nuHcmpCZhpR5dOvfWP7sgfgLAy1K6Z_e87zuNhJkik51fbVS4vNka1JGMu4CJjyycezfW0_1V. CX9K90XvT_RnbhWNy8u15GXfHc9oMECo70ixDC5KhZJ.pUML_J2GkvprdSBB_x.mCED3lLjx_hGd BtBTBcYnBnMUPcACt__zkr4si8AOZHOjtLvi6OWbq4V1._3VhLoShmZlILJ6Qza6i0ndoMIDud3w kFzKYmrt70GB4rWn07cQLxbYd_.NK3WCK9YJswfaFXrVIWdg5L0lB1QtY0IaekhQsxin8LRAByeA 3ZEmvepgj214wmcKYdALuVL1h1tMhcqLomXoBIlQsJydjqPYaKpANGf5uEDWVEQN8BsEQqGqfPa3 zuaxV19wJW1TqxN42PHKZlku3bh4H7cTeCIgG786roEBcrZ1.hGav8Suk3Xlw9nCljICspovtJDk nmqmCRkMuY5B3Ay4XmSKbimqx.yrLbU9UjHxS9Cvmy6hbAAcp0uRu4cZmdpor40Z4aEqYj7zItS_ jQmBbr5on0F0tPcZSwU5NHvLuyDoOy0ziqLPZG8BBlaVcdjbXQA0rXtJxhGnJSEpLhX41XXvX6K7 0klaNlcWD8Y5fR1HyWigWBBTdGQ_fAobMIZkuGFHqu8uixDSDb1lqZF2L8onBnmNkrKLPDLlZzy_ RoNI0NsjndNxeNT881bbP8QeF91jbmsCPk0hW.LoE6 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Mon, 15 Nov 2021 12:40:00 +0000 Original-Received: by kubenode514.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID e12d6f4d0a40d5b8ac37b0f4ed6db671; Mon, 15 Nov 2021 12:39:54 +0000 (UTC) X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.190.31; envelope-from=luangruo@yahoo.com; helo=sonic307-56.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:279491 Archived-At: I was implementing pixel-based scrolling based on XInput 2 pixel scroll events earlier, and i noticed this line in xdisp.c: /* Handle case where place to start displaying has been specified, unless the specified location is outside the accessible range. */ if (w->force_start) { /* We set this later on if we have to adjust point. */ int new_vpos = -1; w->force_start = false; --> w->vscroll = 0; w->window_end_valid = false; It resets the vscroll whenever window start changes, which is annoying if you, for example, recenter the window during pixel scroll. Is it OK to control whether or not the vscroll is reset there based on a variable or a window parameter? It would be very convenient to have such a feature. Thanks.