Subject: Re: bug#72721: 31.0.50; Visual-wrap-prefix-mode breaks Magit log buffers

From: Eli Zaretskii <[email-masked]>
Date: Sun, 25 Aug 2024 10:29:22 +0300

> Date: Thu, 22 Aug 2024 09:19:47 -0700
> Cc: [email-masked], [email-masked]
> From: Jim Porter <[email-masked]>
> 
> On 8/22/2024 2:53 AM, Eli Zaretskii wrote:
> > Thanks for the test cases, they helped a lot.
> > 
> > Can you please try the patch below, including in the original use case
> > with Magit?  I hope I've figured out all of the quirks of min-width
> > and its possible uses, and the few extensions you demonstrated.  It
> > should be possible now to have min-width on overlay strings as well, I
> > think (but I didn't test that).
> 
> This works for me in all my test cases (except "overlay-min-width"), 
> including the original report with Magit. I also replaced 
> 'Fget_text_property' with 'Fget_char_property' in 'get_display_property' 
> and tested that: it works with all my test cases, including 
> "overlay-min-width".
> 
> If you're not too worried about using 'Fget_char_property', I think that 
> would be the preferable patch, since it would (probably?) make it easier 
> for me to fix a small bug I noticed in 'visual-wrap-prefix-mode': I 
> neglected to remove the 'min-width' properties when deactivating the 
> mode. Using overlays for that might make it easier to wipe them out at 
> the right time.

I made the change to use Fget_char_property and installed the
changeset on the master branch.  Please note that overlays can be
window-specific, and the changes I installed are supposed to handle
that, but I didn't test that too much.  Please test with
window-specific overlays and see if it works correctly; if not, I'd
appreciate a test case for looking into the failure.

Thanks.