Subject: Re: bug#72485: Support 'visual-wrap-prefix-mode' in SHR/EWW

From: Eli Zaretskii <[email-masked]>
Date: Sat, 17 Aug 2024 11:55:57 +0300

> Date: Mon, 5 Aug 2024 20:47:52 -0700
> From: Jim Porter <[email-masked]>
> 
> This patch is an extension of bug#71605, and the first place to 
> explicitly use the new variable-pitch support for 
> 'visual-wrap-prefix-mode'. While implementing this, I found two small 
> bugs in the new 'visual-wrap-prefix-mode' code:
> 
> 1. When setting the min-width for the first line prefix, we should use 
> 'add-display-text-property' so as not to clobber other display properties.
> 
> 2. My attempts to be "helpful" by special-casing wrap-prefixes of all 
> spaces ended up just interfering with more complex cases (like SHR), so 
> I removed it. The code is now simpler (one fewer condition) and just 
> works more smoothly overall.
> 
> There's one limitation to this patch though: since SHR uses absolute 
> pixel-widths for indenting internally, things can look mis-indented if 
> you scale the text in the buffer. However, SHR has exactly the same 
> issue when *not* using 'visual-wrap-prefix-mode', so it's really just a 
> more-general bug in SHR. (It'd be nice to fix that, but I'd have to get 
> a better understanding of how indentation and <table> elements interact.)

Thanks.  This lacks a NEWS entry, but other than that, feel fee to
install on master when ready.