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#71605: 30.0.50; [PATCH] Support variable-width text in 'visual-wrap-prefix-mode' Date: Tue, 18 Jun 2024 15:53:13 +0300 Message-ID: <868qz2quo6.fsf@gnu.org> References: <835c7897-d276-b0fe-6d1e-8e6a20cac2bb@gmail.com> <4e596683-665e-8e2c-c201-9ddcb476d195@gmail.com> <86le33qr8d.fsf@gnu.org> <9fe82edb-d0f1-faaf-2b1c-6c3aa66832b2@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16422"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 71605@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 18 14:54:16 2024 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 1sJYLm-0003yp-3O for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jun 2024 14:54:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJYLa-0005mv-3R; Tue, 18 Jun 2024 08:54:02 -0400 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 1sJYLY-0005mk-QM for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 08:54:00 -0400 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 1sJYLY-0006t1-JO for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 08:54:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJYLa-000298-4V for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 08:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jun 2024 12:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71605 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71605-submit@debbugs.gnu.org id=B71605.17187152258224 (code B ref 71605); Tue, 18 Jun 2024 12:54:02 +0000 Original-Received: (at 71605) by debbugs.gnu.org; 18 Jun 2024 12:53:45 +0000 Original-Received: from localhost ([127.0.0.1]:42207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJYLI-00028a-Or for submit@debbugs.gnu.org; Tue, 18 Jun 2024 08:53:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJYLF-00028L-T1 for 71605@debbugs.gnu.org; Tue, 18 Jun 2024 08:53:43 -0400 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 1sJYL6-0006qQ-PP; Tue, 18 Jun 2024 08:53:32 -0400 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=oWSNdEpZb8HAq+LpDsK15J+4DJqt6SqmvUkN4+JdM/c=; b=RNfGNlZlnNEZ y37eVXWvdEMEFFvXx3vXH1T2Wzzw9ZpDjsFTIObQPEOX2fVWeQvInHc1czJ9i6sIR9GbVXucC7W/w m/Y5dcBHAO1+oawYvvnUEFNhZM37s8EAEuKAuX8LAQSu4fhmuy4+CPIXPWyQxE7YXMWTLck9071c3 eStrMco+OQOpUyPltfvusPs6I1weKkrzesrgK6WDTPdGZLyCN/3oN8nGpvGnxfoeTW0wcbmjYIF/e fUt3d/8PGZzDcslmH9b0Uo59LtKGUJFz2tO8HOpwXfe7fmuiZcegUuWq98ocvlfOGebHg0qwDzwLC mmNXj46cKZydYvfRmokZZg==; In-Reply-To: (message from Jim Porter on Mon, 17 Jun 2024 23:27:49 -0700) 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:287435 Archived-At: > Date: Mon, 17 Jun 2024 23:27:49 -0700 > From: Jim Porter > Cc: luangruo@yahoo.com, 71605@debbugs.gnu.org > > On 6/17/2024 8:02 PM, Jim Porter wrote: > > Just so others are aware I'm going to try and bisect this. I'll report > > back when it's finished. > > Looks like this is the commit that regressed this: > > > commit fb3d582e7ba595b7680e2c2adf22c7ab699e5792 > Author: Eli Zaretskii > Date: Wed Jun 29 20:15:36 2022 +0300 > > Fix hscrolling of :align-to when display-line-numbers is in effect > > * src/dispextern.h (struct it): Rename 'tab_offset' member to > 'stretch_adjust'. > * src/xdisp.c (gui_produce_glyphs, produce_stretch_glyph) > (display_line): All users of 'tab_offset' changed. > (produce_stretch_glyph): Fix calculation of ':align-to' when > line numbers are displayed and the window is hscrolled. > (calc_pixel_width_or_height): Fix calculation of width of 'space' > display property when 'display-line-numbers' is turned on, but the > line number was not yet produced for the current glyph row. > (Bug#56176) Thanks. Unfortunately, it means the current behavior is not a bug, but rather an unintended consequence of another bugfix. The above changeset changed :align-to to count from the beginning of the physical line, not the screen line. So, for example, if you have an 80-column line, the continuation line begins from column 80, not 0. Thus, something like ':align-to 4' will never work on continuation lines, because we got past column 4 long ago... So I need to think whether and how to restore the capability of using :align-to in wrap-prefix.