better error message when trying to open file with editor

This commit is contained in:
Anton-4 2021-06-30 10:30:37 +02:00
parent c34c27b58d
commit ece2a2b9d3
2 changed files with 3 additions and 1 deletions

View File

@ -330,6 +330,8 @@ fn run_event_loop(file_path_opt: Option<&Path>) -> Result<(), Box<dyn Error>> {
)
}
} else {
begin_render_pass(&mut encoder, &frame.view, &ed_theme);
queue_no_file_text(
&size,
NOTHING_OPENED,

View File

@ -1,3 +1,3 @@
pub const NOTHING_OPENED: &str = "Execute `cargo run edit <filename>` to open a file.";
pub const NOTHING_OPENED: &str = "Opening files is not yet supported. Execute `cargo run edit` from the root folder of the repo to try the editor.";
pub const START_TIP: &str =
"Start by typing '[', '{', '\"' or a number.\nInput chars that would create parse errors will be ignored.";