Merge pull request #1445 from rtfeldman/better-file-error-msg

better error message when trying to open file with editor
This commit is contained in:
Anton-4 2021-06-30 10:51:11 +02:00 committed by GitHub
commit ea35ed5755
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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.";