aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src/state.rs')
-rw-r--r--helix-core/src/state.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/helix-core/src/state.rs b/helix-core/src/state.rs
index 150874b1..55ac5095 100644
--- a/helix-core/src/state.rs
+++ b/helix-core/src/state.rs
@@ -102,6 +102,11 @@ impl State {
self.mode
}
+ #[inline]
+ pub fn path(&self) -> Option<&PathBuf> {
+ self.path.as_ref()
+ }
+
// pub fn doc<R>(&self, range: R) -> RopeSlice
// where
// R: std::ops::RangeBounds<usize>,