From 247bd19f93e11fb037c945ff1dc464a1d1713471 Mon Sep 17 00:00:00 2001 From: mo8it Date: Wed, 4 Sep 2024 02:19:45 +0200 Subject: Canonicalize exercise paths only once --- src/watch/state.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/watch/state.rs') diff --git a/src/watch/state.rs b/src/watch/state.rs index 1c2e2a9..fe9e274 100644 --- a/src/watch/state.rs +++ b/src/watch/state.rs @@ -11,7 +11,7 @@ use crate::{ app_state::{AppState, ExercisesProgress}, clear_terminal, exercise::{solution_link_line, RunnableExercise, OUTPUT_CAPACITY}, - term::{progress_bar, terminal_file_link}, + term::progress_bar, }; #[derive(PartialEq, Eq)] @@ -184,7 +184,9 @@ impl<'a> WatchState<'a> { )?; stdout.write_all(b"\nCurrent exercise: ")?; - terminal_file_link(stdout, self.app_state.current_exercise().path, Color::Blue)?; + self.app_state + .current_exercise() + .terminal_file_link(stdout)?; stdout.write_all(b"\n\n")?; self.show_prompt(stdout)?; -- cgit v1.2.3