summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/progress_bar.rs2
-rw-r--r--src/watch/state.rs6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/progress_bar.rs b/src/progress_bar.rs
index 97c8ad9..d6962b8 100644
--- a/src/progress_bar.rs
+++ b/src/progress_bar.rs
@@ -49,7 +49,7 @@ pub fn progress_bar(progress: u16, total: u16, line_width: u16) -> Result<String
write!(line, "{}", red_part.red()).unwrap();
}
- write!(line, "] {progress:>3}/{total} exercises").unwrap();
+ writeln!(line, "] {progress:>3}/{total} exercises").unwrap();
Ok(line)
}
diff --git a/src/watch/state.rs b/src/watch/state.rs
index 751285f..da5ac3d 100644
--- a/src/watch/state.rs
+++ b/src/watch/state.rs
@@ -149,6 +149,12 @@ You can keep working on this exercise or jump into the next one by removing the
let progress_bar = progress_bar(self.progress, self.exercises.len() as u16, line_width)?;
self.writer.write_all(progress_bar.as_bytes())?;
+ self.writer.write_all(b"Current exercise: ")?;
+ self.writer.write_fmt(format_args!(
+ "{}",
+ self.exercise.path.to_string_lossy().bold()
+ ))?;
+
self.show_prompt()?;
Ok(())