diff options
author | Blaž Hrastnik | 2021-05-03 08:23:11 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-05-03 08:23:11 +0000 |
commit | 28c167d71d910d113d5217349830a42fa52e9a9d (patch) | |
tree | 8cd2790b625761c2da16cce4ba2acf238f1729a4 /helix-core | |
parent | 594575ba3f1cd1775f104c95ce604f952ccd5caf (diff) |
doc: Be smarter about calculating modified status.
This way edit -> undo will properly show up as unmodified.
Diffstat (limited to 'helix-core')
-rw-r--r-- | helix-core/src/history.rs | 5 |
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 } |