diff options
author | Alexis-Lapierre | 2023-04-30 22:40:06 +0000 |
---|---|---|
committer | GitHub | 2023-04-30 22:40:06 +0000 |
commit | b0b3f45b80931e73eadaf7e73f1981283b8e49fc (patch) | |
tree | 77329232f1ca98e5eaa131f471ea25b23e5eb0d5 /helix-view/src/editor.rs | |
parent | efd09b6c7ccf8cdfde5856fd9db0d9b29ea5bd81 (diff) |
Conserve BOM and properly support UTF16 (#6497)
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 005c6667..8e4dab41 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -1305,10 +1305,10 @@ impl Editor { } pub fn new_file_from_stdin(&mut self, action: Action) -> Result<DocumentId, Error> { - let (rope, encoding) = crate::document::from_reader(&mut stdin(), None)?; + let (rope, encoding, has_bom) = crate::document::from_reader(&mut stdin(), None)?; Ok(self.new_file_from_document( action, - Document::from(rope, Some(encoding), self.config.clone()), + Document::from(rope, Some((encoding, has_bom)), self.config.clone()), )) } |