aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
authorNathan Vegdahl2021-06-21 16:52:21 +0000
committerNathan Vegdahl2021-06-21 16:52:21 +0000
commit714002048cc9601bf0981435c6d3ad43d1c765e8 (patch)
treec68ce81614c94c9ef89bbf5d3e4846838758f846 /helix-view
parent3d3149e0d55f54440fa28a446ef3facdb386e5c1 (diff)
Don't need getters/setters for line_ending property.
It's plain-old-data. If we want to do fancier things later, it's easy to switch back.
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/document.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index 9326fb79..945271ea 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -268,7 +268,7 @@ impl Document {
// set the path and try detecting the language
doc.set_path(&path)?;
doc.detect_indent_style();
- doc.set_line_ending(line_ending);
+ doc.line_ending = line_ending;
if let Some(loader) = config_loader {
doc.detect_language(theme, loader);
@@ -531,10 +531,6 @@ impl Document {
self.selections.insert(view_id, selection);
}
- pub fn set_line_ending(&mut self, line_ending: LineEnding) {
- self.line_ending = line_ending;
- }
-
fn _apply(&mut self, transaction: &Transaction, view_id: ViewId) -> bool {
let old_doc = self.text().clone();
@@ -805,10 +801,6 @@ impl Document {
pub fn set_diagnostics(&mut self, diagnostics: Vec<Diagnostic>) {
self.diagnostics = diagnostics;
}
-
- pub fn line_ending(&self) -> LineEnding {
- self.line_ending
- }
}
#[cfg(test)]