diff --git a/src/editor.rs b/src/editor.rs index 7c0161f..94b6d96 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -60,6 +60,10 @@ impl Editor { } self.filename = Some(filename.clone()); self.screen.set_filename(Some(filename.clone())); + } else { + File::create(filename).unwrap(); + self.filename = Some(filename.clone()); + self.screen.set_filename(Some(filename.clone())); } } } diff --git a/test.txt b/test.txt deleted file mode 100644 index 72e7812..0000000 --- a/test.txt +++ /dev/null @@ -1,7 +0,0 @@ -sadfsadfsfs -asdfa -asdfa -asdfa -sdafs -asdfa -dasfdsad