aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/state.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-core/src/state.rs b/helix-core/src/state.rs
index 05380d5e..8ebf3887 100644
--- a/helix-core/src/state.rs
+++ b/helix-core/src/state.rs
@@ -117,6 +117,12 @@ impl State {
Selection::new(ranges.collect(), sel.primary_index)
// TODO: update selection in state via transaction
}
+
+ pub fn file(&self) -> &Rope {
+ // used to access file contents for rendering to screen
+ let copy = &self.doc.contents;
+ copy
+ }
}
/// Coordinates are a 0-indexed line and column pair.