mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 00:47:30 +00:00
6dd2cd2b20
Padding with an unprintable character is now disallowed, like it was for other zero-length characters. `string shorten` now ignores escape sequences and non-printable characters when calculating the visible width of the ellipsis used (except for `\b`, which is treated as a width of -1). Previously `fish_wcswidth` returned a length of -1 when the ellipsis-str contained any non-printable character, causing the command to poentially print a larger width than expected. This also fixes an integer overflows in `string shorten`'s `max` and `max2`, when the cumulative sum of character widths turned negative (e.g. with any non-printable characters, or `\b` after the changes above). The overflow potentially caused strings containing non-printable characters to be truncated. This adds test that verify the fixed behaviour. |
||
---|---|---|
.. | ||
checks | ||
pexpects | ||
test_functions | ||
.gitignore | ||
history_sample_bash | ||
history_sample_corrupt1 | ||
history_sample_fish_1_x | ||
history_sample_fish_2_0 | ||
interactive.config | ||
interactive.fish | ||
test.fish | ||
test_driver.sh | ||
test_env.sh | ||
test_util.fish |