bug#81626: 32.0.50; string-pixel-width can return an incorrect value after commit 165152e
David Ponce via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
Le 2026-08-16 à 08:06, Eli Zaretskii a écrit : >> Cc: [email protected] >> Date: Sat, 15 Aug 2026 22:03:40 +0200 >> From: David Ponce <[email protected]> >> >> Hello, >> >> After commit 165152e >> Fix an infloop during cursor movement >> * src/xdisp.c (move_it_vertically_backward): Prevent infloop due >> to overlays with embedded newlines at BOB. (Bug#81567) >> >> `string-pixel-width' no more return a correct value if the >> passed string is wider than the window body. Here is a simple recipe to >> test in the *scratch* buffer, running emacs -Q: >> >> (window-body-width) >> 80 >> (window-body-width nil t) >> 960 >> (string-pixel-width (make-string 80 ?x)) >> 960 <=== CORRECT >> (string-pixel-width (make-string 81 ?x)) >> 12 <=== INCORRECT >> >> Before this commit the result is correct: >> >> (window-body-width) >> 80 >> (window-body-width nil t) >> 960 >> (string-pixel-width (make-string 80 ?x)) >> 960 <=== CORRECT >> (string-pixel-width (make-string 81 ?x)) >> 972 <=== CORRECT > > Thanks, should be fixed now. I confirm. Thanks.