diff options
author | Nathan Vegdahl | 2021-07-29 19:53:39 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-07-30 03:20:29 +0000 |
commit | e191a75e336885b4dd8c3d0a80b7b24000a0ca5a (patch) | |
tree | aa4226331c710eaa17dc47f241beca701c22b3b0 /helix-view/src | |
parent | e6e0d31be0546481e69be9ae11dc19b341746f42 (diff) |
Give default document a single line ending.
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/document.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index c2078060..9eabda46 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -1080,7 +1080,7 @@ impl Document { impl Default for Document { fn default() -> Self { - let text = Rope::from(""); + let text = Rope::from(DEFAULT_LINE_ENDING.as_str()); Self::from(text, None) } } @@ -1205,7 +1205,10 @@ mod test { #[test] fn test_line_ending() { - assert_eq!(Document::default().text().to_string(), ""); + assert_eq!( + Document::default().text().to_string(), + DEFAULT_LINE_ENDING.as_str() + ); } macro_rules! test_decode { |