Commit ddc8c882 authored by genbyte's avatar genbyte

Fix Issue #83

parent 88f55176
......@@ -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())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment