bug#81626: 32.0.50; string-pixel-width can return an incorrect value after commit 165152e
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
> Date: Sun, 16 Aug 2026 10:59:56 +0200 > Cc: [email protected] > From: David Ponce <[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. Thanks for testing, I'm therefore closing the bug.