From 8958f06f0824965d030adc7522303129da014315 Mon Sep 17 00:00:00 2001 From: Jan Hrastnik Date: Tue, 16 Jun 2020 22:46:27 +0200 Subject: added file rendering --- helix-core/src/state.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'helix-core/src') 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. -- cgit v1.2.3-70-g09d2