diff options
| author | LorenzoPegorari <lorenzo.pegorari2002@gmail.com> | 2026-02-27 22:45:19 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-27 13:59:22 -0800 |
| commit | 1a9df8de368cbebd881336f64e424422f3dbb993 (patch) | |
| tree | 612cbc791abde72fe318c8c3f84cb1a5b9256582 /contrib/persistent-https | |
| parent | 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed (diff) | |
| download | git-1a9df8de368cbebd881336f64e424422f3dbb993.tar.gz git-1a9df8de368cbebd881336f64e424422f3dbb993.zip | |
diff: handle ANSI escape codes in prefix when calculating diffstat width
The diffstat width is calculated by taking the terminal width and
incorrectly subtracting the `strlen()` of `line_prefix`, instead of the
actual display width of `line_prefix`, which may contain ANSI escape
codes (e.g., ANSI-colored strings in `log --graph --stat`).
Utilize the display width instead, obtained via `utf8_strnwidth()` with
the flag `skip_ansi`.
Signed-off-by: LorenzoPegorari <lorenzo.pegorari2002@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
