1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 12:37:49 +00:00

ptx: remove a hack that was added in attempt to mimick GNU ptx

This commit is contained in:
Wisha Wa 2021-04-06 13:40:14 +00:00
parent f9fc3b5a1d
commit 5fc007b295

View file

@ -414,11 +414,7 @@ fn get_output_chunks(
// end = begin + max length
let tail_end = cmp::min(all_after.len(), tail_beg + max_tail_size) as usize;
// in case that falls in the middle of a word, trim away the word.
let tail_end = trim_broken_word_right(
all_after,
tail_beg,
cmp::max(tail_end as isize - 1, tail_beg as isize) as usize,
);
let tail_end = trim_broken_word_right(all_after, tail_beg, tail_end);
// trim away whitespace again.
let (tail_beg, tail_end) = trim_idx(all_after, tail_beg, tail_end);