We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d14e24b commit d3f8697Copy full SHA for d3f8697
2 files changed
crates/edit/src/bin/edit/documents.rs
@@ -282,6 +282,7 @@ impl DocumentManager {
282
let buffer = TextBuffer::new_rc(false)?;
283
{
284
let mut tb = buffer.borrow_mut();
285
+ tb.set_insert_final_newline(!cfg!(windows)); // As mandated by POSIX.
286
tb.set_margin_enabled(true);
287
tb.set_line_highlight_enabled(true);
288
}
crates/edit/src/buffer/mod.rs
@@ -316,7 +316,7 @@ impl TextBuffer {
316
ruler: 0,
317
encoding: "UTF-8",
318
newlines_are_crlf: cfg!(windows), // Windows users want CRLF
319
- insert_final_newline: !cfg!(windows), // As mandated by POSIX.
+ insert_final_newline: false, // NOTE: Even with POSIX, single-line buffers need this to be false
320
overtype: false,
321
322
wants_cursor_visibility: false,
0 commit comments