mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
`visual-wrap--content-prefix' previously returned a column count
computed as
(max (string-width prefix)
(ceiling (string-pixel-width prefix) avg-space-width))
with two problems:
* `string-width' ignores `buffer-invisibility-spec', so an invisible
prefix (hidden ATX markers under `markdown-ts-hide-markup', for
example) still reserved its character count on line 1 via a
`min-width' display property, shifting the visible heading right.
* With variable-pitch fonts, rounding the prefix width up to whole
columns added visible padding whenever the natural width did not
fall on an exact column boundary.
Return the prefix's natural pixel width via `string-pixel-width'
instead, which accounts for any display transformation applied to
the prefix (invisibility, `display' replacements, text scaling,
proportional fonts). Drop the `min-width' property from
`visual-wrap--apply-to-line' so line 1 renders at its natural width.
Switch the continuation `wrap-prefix' to a mixed-unit `:align-to'
sum form:
(space :align-to (+ (PIX) (EXTRA-INDENT . width)))
where PIX is the prefix's pixel width and EXTRA-INDENT is
`visual-wrap-extra-indent' in canonical character widths. The
display engine resolves each term per the active frame and sums
them, so no Lisp-level unit conversion is needed.
Since `min-width' is no longer installed, the accumulation cycle
that commit
|
||
|---|---|---|
| .. | ||
| cedet | ||
| etags | ||
| indent | ||
| noverlay | ||
| BidiCharacterTest.txt | ||
| biditest.el | ||
| image-circular-tests.el | ||
| image-size-tests.el | ||
| image-tests.el | ||
| image-transforms-tests.el | ||
| process-callout-tests.el | ||
| redisplay-testsuite.el | ||
| scroll-tests.el | ||
| visual-wrap-test.el | ||