]> git.eshelyaron.com Git - emacs.git/commit
Improve calculation of indent prefixes when using text scaling
authorJim Porter <jporterbugs@gmail.com>
Tue, 4 Feb 2025 17:25:17 +0000 (09:25 -0800)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Feb 2025 08:34:57 +0000 (09:34 +0100)
commit757051908bd998ee95f6b6a51e5d56bc188129ec
tree77b71aa23c0ba0d40d2a211d609aded99d60ba91
parentb60b01f4183eef05f3c48891ba53201230154963
Improve calculation of indent prefixes when using text scaling

Previously, the display spec for the "average space" was wrong.  It used
a plain number for the width of the specified space, which means "N
times the normal character width for the buffer", but we want "N times
the normal character width for the *current face*" (bug#76008).

* lisp/visual-wrap.el (visual-wrap--content-prefix): Specify the width
of the "average space" in terms of the average width of the current
face.

* lisp/net/shr.el (shr-indent): As above, and call 'string-pixel-width'
without specifying the buffer, to match 'shr-string-pixel-width'.

(cherry picked from commit 6842415577405adafcba16f8cbff02f35b5583f9)
lisp/net/shr.el
lisp/visual-wrap.el