From 695b82a53d91ad11ff8897a882999decd841484c Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 30 Apr 2024 12:25:07 -0600 Subject: [PATCH] Save file using original line endings --- src/tab.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tab.rs b/src/tab.rs index 3f9035b..aac6287 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -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) {