bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#71605: 30.0.50; [PATCH] Support variable-width text in 'visual-wrap-


From: Eli Zaretskii
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

> Date: Mon, 17 Jun 2024 23:27:49 -0700
> From: Jim Porter <jporterbugs@gmail.com>
> 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 <eliz@gnu.org>
> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]