aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src')
-rw-r--r--helix-core/src/history.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/helix-core/src/history.rs b/helix-core/src/history.rs
index df4b9fc4..5a9ec8de 100644
--- a/helix-core/src/history.rs
+++ b/helix-core/src/history.rs
@@ -56,6 +56,11 @@ impl History {
}
#[inline]
+ pub fn current_revision(&self) -> usize {
+ self.cursor
+ }
+
+ #[inline]
pub const fn at_root(&self) -> bool {
self.cursor == 0
}