]> git.eshelyaron.com Git - emacs.git/commit
Don't add visual-wrap-prefix properties to unsafe multi-line display specs
authorJim Porter <jporterbugs@gmail.com>
Fri, 4 Oct 2024 00:24:18 +0000 (17:24 -0700)
committerEshel Yaron <me@eshelyaron.com>
Tue, 27 May 2025 14:34:53 +0000 (16:34 +0200)
commitcc67abbd453c47db2096da60e2d3d2ea37c36c37
tree154bc76fc339738b475bc41f154ebe4159adbac3
parent93b27d32cda0f62b5e39709f2bbedb32b1cd49ec
Don't add visual-wrap-prefix properties to unsafe multi-line display specs

This makes sure we don't interfere with other display specs, e.g. for
images displayed in 'image-mode' (bug#73600).

* lisp/visual-wrap.el (visual-wrap--safe-display-specs): New variable.
(visual-wrap--display-property-safe-p): New function.
(visual-wrap--apply-to-line): Use 'pos-eol'; we don't want to respect
field boundaries here.
(visual-wrap-prefix-function): Check for unsafe display properties at
the end of the line and skip past them if present.

* test/lisp/visual-wrap-tests.el: New test file.

(cherry picked from commit 8762f6c7c974d028816a74169e3d6fdecaec8d6d)
lisp/visual-wrap.el
test/lisp/visual-wrap-tests.el [new file with mode: 0644]