INNER CODE UNIT · Rust
Some
sachaos/viddy · src/bytes.rs:12
while let Some(c) = chars.next() {
let count = skip_ansi_escape_sequence(c, &mut chars.clone());
if count > 0 {
b.push(c);
for _ in 0..count {
b.push(chars.next().unwrap_or(' '));
}
continue;
}
if c == '\t' {
let r = TAB_SIZE - (width % TAB_SIZE);
b.resize(b.len() + r, ' ');
width += r;
} else if c == '\n' {
b.push('\n');
width = 0;
} else {