Commit fcae711a authored by Jeremy Soller's avatar Jeremy Soller

When opening an empty file, always have at least one line of text

parent 1203a62d
......@@ -20,6 +20,10 @@ impl Editor {
let mut con = String::new();
let _ = file.read_to_string(&mut con);
if con.is_empty() {
con.push('\n');
}
let mut new_buffer: Buffer = SplitBuffer::from_str(&con).into();
new_buffer.title = Some(path.into());
......
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