diff options
| author | mo8it <mo8it@proton.me> | 2024-04-10 03:56:41 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-04-10 03:56:41 +0200 |
| commit | a46d66134b26095e553f284c02de9a895e15f180 (patch) | |
| tree | 526f65e4672ca153ff2f24ae67a88afa8ac4fcf8 | |
| parent | f034899c7f8de93ff572722b1cdf44f73c6452b5 (diff) | |
Fix shift of first output line
| -rw-r--r-- | src/watch/state.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/watch/state.rs b/src/watch/state.rs index 393ea02..08707a4 100644 --- a/src/watch/state.rs +++ b/src/watch/state.rs @@ -127,6 +127,9 @@ You can keep working on this exercise or jump into the next one by removing the } pub fn render(&mut self) -> Result<()> { + // Prevent having the first line shifted after clearing because of the prompt. + self.writer.write_all(b"\n")?; + self.writer.execute(Clear(ClearType::All))?; if let Some(stdout) = &self.stdout { |
