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

more: add todo for unicode width

This commit is contained in:
Terts Diepraam 2021-05-29 12:45:12 +02:00
parent 40ee9023e8
commit 9d17c1fddf

View file

@ -316,6 +316,7 @@ fn break_buff(buff: &str, cols: usize) -> Vec<String> {
fn break_line(mut line: &str, cols: usize) -> Vec<String> {
let breaks = (line.len() / cols).saturating_add(1);
let mut lines = Vec::with_capacity(breaks);
// TODO: Use unicode width instead of the length in bytes.
if line.len() < cols {
lines.push(line.to_string());
return lines;