1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +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 byte += nbytes; // advance the pointer
} }
safe_unwrap!(output.flush());
buf.truncate(0); // clear the buffer buf.truncate(0); // clear the buffer
} }
} }

View file

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