Skip to content
Snippets Groups Projects
Verified Commit ddc8c882 authored by genbyte's avatar genbyte
Browse files

Fix Issue #83

parent 88f55176
No related branches found
No related tags found
No related merge requests found
......@@ -37,10 +37,10 @@ impl Editor {
}
/// Write the file.
pub fn write<'a> (&'a mut self, mut path: &'a str) -> FileStatus {
pub fn write<'a> (&'a mut self, path: &'a str) -> FileStatus {
self.buffers.current_buffer_info_mut().title = Some(path.into());
if path == "" {
path = self.files[0].as_str();
return FileStatus::Other;
}
if let Some(mut file) = File::create(path).ok() {
if file.write(self.buffers.current_buffer().to_string().as_bytes())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment