1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

flush output of unexpand command as well

This commit is contained in:
muskuloes 2020-04-20 22:21:57 +02:00
parent fb8f3ebf96
commit b4752e079f
2 changed files with 2 additions and 1 deletions

View file

@ -244,10 +244,10 @@ fn expand(options: Options) {
}
}
safe_unwrap!(output.flush());
byte += nbytes; // advance the pointer
}
safe_unwrap!(output.flush());
buf.truncate(0); // clear the buffer
}
}

View file

@ -324,6 +324,7 @@ fn unexpand(options: Options) {
// write out anything remaining
write_tabs(&mut output, ts, scol, col, pctype == Tab, init, true);
safe_unwrap!(output.flush());
buf.truncate(0); // clear out the buffer
}
}