GNU bug report logs -
#73600
31.0.50; Visual wrap prefix mode and image display
Previous Next
Full log
Message #61 received at 73600-done <at> debbugs.gnu.org (full text, mbox):
On 10/19/2024 1:23 AM, Eli Zaretskii wrote:
> I think at this stage it is basically up to you which version to
> install. Adding tests is always welcome, of course, regardless of
> which version is installed.
This is much-delayed, but now that I'm back from an extended break, I've
now merged the "safer" version of my change as <>.
Here's a short summary of the issue: the new visual-wrap code inserts a
'min-width' display property to make sure everything lines up. This
usually works ok, but fails when a "replacing" display spec spans
multiple lines of the buffer text. That comes up in 'image-mode', where
the buffer text is the image data, and we apply a display spec to show
the image. If the image data contains a 0x0a byte (line feed), then the
visual-wrap code would insert a 'min-width' property on *part* of the
buffer contents, confusing the display engine into thinking should be
multiple images.
The fix is to skip past any replacing display specs when scanning the
buffer. The new code also includes a list of known-safe display specs
that don't have this problem: 'visual-wrap--safe-display-specs'. I was
intentionally conservative with that list, but we could add more to it
as needed.
I've tried many different variations to try to break the "safe" version
of my patch (which I still think is less strictly-correct than the other
version), but I couldn't. Since the difference likely won't come up, I
opted to merge the patch that Eli felt more comfortable with.
I've marked this bug as done, but if I've missed anything, just let me know.
This bug report was last modified 20 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.