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.devel Subject: Re: Redisplay resets vscroll when window start changes Date: Thu, 18 Nov 2021 08:36:18 +0200 Message-ID: <83zgq2x95p.fsf@gnu.org> References: <87k0h9pp7t.fsf.ref@yahoo.com> <87k0h9pp7t.fsf@yahoo.com> <83r1bhsdsn.fsf@gnu.org> <87tugdnf1x.fsf@yahoo.com> <831r3g2rhe.fsf@gnu.org> <87tugcuuoz.fsf@yahoo.com> <87o86kuuek.fsf@yahoo.com> <83r1bg1ay4.fsf@gnu.org> <87zgq4te32.fsf@yahoo.com> <83mtm41afl.fsf@gnu.org> <875yssufhf.fsf@md5i.com> <87czmztynn.fsf@yahoo.com> <83wnl7zcej.fsf@gnu.org> <83o86izyrt.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26820"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, mwd@md5i.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 18 07:37:42 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 1mnb3F-0006lU-IC for ged-emacs-devel@m.gmane-mx.org; Thu, 18 Nov 2021 07:37:41 +0100 Original-Received: from localhost ([::1]:51756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnb3D-0007UF-Kx for ged-emacs-devel@m.gmane-mx.org; Thu, 18 Nov 2021 01:37:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnb1z-0006lH-Eg for emacs-devel@gnu.org; Thu, 18 Nov 2021 01:36:23 -0500 Original-Received: from [2001:470:142:3::e] (port=36444 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnb1y-0003kJ-AQ; Thu, 18 Nov 2021 01:36:22 -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=2miro0i+y8ttRif4OpT0KGmXef+zsNGU51L0QX89FQA=; b=l1TWJAu+VY12 ipNGhGw8dv2DH5IfsE+GTe9QbFu42N6cnz2QxacZggwW9xwxPf5AtaZw8/PYQrF9Jw9Zi2q0S5l5f 7/qkGIa3/7fBcPUzaAxLP57zH90D3A1ZL6CRi+Miv5PDbcrIGxHZ2/IeaHj5Y4YmACwMcP/rpzXdO AKn8G3vwqvBk6pr5TQ1pZWHRGbAso19BCKCrF3GpeVhY0Mf0qG5CAuysBe4ndnLD7FsKloMwgEE2o u197fnDDtPnz6bwYu53Qi3t1JJHRScCe27lFFjRTkh74uFxYVN5q0sX4pi5rknaC/GfyN+lT744jo PGlv2zN2WZtdyIGJ+ENqgg==; Original-Received: from [87.69.77.57] (port=1799 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnb1x-0004Vn-VK; Thu, 18 Nov 2021 01:36:22 -0500 In-Reply-To: (message from Stefan Monnier on Wed, 17 Nov 2021 15:40:39 -0500) 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:279658 Archived-At: > From: Stefan Monnier > Cc: luangruo@yahoo.com, mwd@md5i.com, emacs-devel@gnu.org > Date: Wed, 17 Nov 2021 15:40:39 -0500 > > >> Would there be a way to distinguish the case where line-move can return > >> a correct result without changing vscroll, from the case where it does > >> require changing vscroll in order to find its answer? > > I don't think I understand the question. > > The question can be rephrased as: could `line-move` only reset vscroll > in the case where we're scrolling through a very tall image? It currently handles the case of a tall screen line, which could be due to an image, an xwidget, or simply very large font. If you want to limit it only to those cases, then perhaps the answer is yes, but the problem with those functions is that they try to handle many use cases that are not completely described anywhere, so testing whether a particular change could break any of them is nigh impossible in practice. And the code does work for the use cases for which it was written. Which is why I suggested a completely new command for the purpose under discussion.