aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src
diff options
context:
space:
mode:
authorJan Hrastnik2020-06-16 20:46:27 +0000
committerJan Hrastnik2020-06-16 20:46:27 +0000
commit8958f06f0824965d030adc7522303129da014315 (patch)
treeb2370940023d18363582c68819b6e1f55830cb0b /helix-core/src
parent8119f1ec3d690489869ab31c086c1f239b204d03 (diff)
added file rendering
Diffstat (limited to 'helix-core/src')
-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.