Save file using original line endings

This commit is contained in:
Jeremy Soller 2024-04-30 12:25:07 -06:00
parent 0fa09ab57b
commit 695b82a53d
No known key found for this signature in database
GPG key ID: D02FD439211AF56F

View file

@ -147,7 +147,7 @@ impl EditorTab {
editor.with_buffer(|buffer| {
for line in buffer.lines.iter() {
text.push_str(line.text());
text.push('\n');
text.push_str(line.ending().as_str());
}
});
match fs::write(path, text) {