From 28c167d71d910d113d5217349830a42fa52e9a9d Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Mon, 3 May 2021 17:23:11 +0900 Subject: doc: Be smarter about calculating modified status. This way edit -> undo will properly show up as unmodified. --- helix-core/src/history.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'helix-core/src/history.rs') 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 @@ -55,6 +55,11 @@ impl History { self.cursor = new_cursor; } + #[inline] + pub fn current_revision(&self) -> usize { + self.cursor + } + #[inline] pub const fn at_root(&self) -> bool { self.cursor == 0 -- cgit v1.2.3-70-g09d2