diff options
author | Jan Hrastnik | 2021-06-16 15:00:21 +0000 |
---|---|---|
committer | Jan Hrastnik | 2021-06-16 15:00:21 +0000 |
commit | 3756c21baefa6182beaa9a3d5ced9d720cf9adcb (patch) | |
tree | 1b5593b5b74a41c42ee22958350f4795cde12509 /helix-view/src/editor.rs | |
parent | a364d6c3837c36225dcd4ec9b15ef2c192feef0b (diff) |
rebase on branch line_ending_detection
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r-- | helix-view/src/editor.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 24f43c0e..90abd067 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -1,4 +1,4 @@ -use crate::{theme::Theme, tree::Tree, Document, DocumentId, RegisterSelection, View, ViewId}; +use crate::{theme::Theme, tree::Tree, Document, DocumentId, RegisterSelection, View, ViewId, LineEnding}; use tui::layout::Rect; use tui::terminal::CursorKind; @@ -148,7 +148,7 @@ impl Editor { pub fn new_file(&mut self, action: Action) -> DocumentId { use helix_core::Rope; - let doc = Document::new(Rope::from("\n")); + let doc = Document::new(Rope::from("\n"), LineEnding::LF); let id = self.documents.insert(doc); self.documents[id].id = id; self.switch(id, action); |