aboutsummaryrefslogtreecommitdiff
path: root/helix-vcs/src/diff/line_cache.rs
diff options
context:
space:
mode:
authorPascal Kuthe2023-03-08 01:49:14 +0000
committerGitHub2023-03-08 01:49:14 +0000
commit48b6aa9a699df0680a6d31e9611ebd1ca9909de4 (patch)
tree11459e49578000678f494857cfbe1f60bfe2ba20 /helix-vcs/src/diff/line_cache.rs
parent8c2e447b16e4d11db411b18f2fbe3ac2bc031d89 (diff)
Add command for resetting diff hunks (#5736)
Diffstat (limited to 'helix-vcs/src/diff/line_cache.rs')
-rw-r--r--helix-vcs/src/diff/line_cache.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/helix-vcs/src/diff/line_cache.rs b/helix-vcs/src/diff/line_cache.rs
index c3ee5daa..8e48250f 100644
--- a/helix-vcs/src/diff/line_cache.rs
+++ b/helix-vcs/src/diff/line_cache.rs
@@ -43,6 +43,14 @@ impl InternedRopeLines {
res
}
+ pub fn doc(&self) -> Rope {
+ self.doc.clone()
+ }
+
+ pub fn diff_base(&self) -> Rope {
+ self.diff_base.clone()
+ }
+
/// Updates the `diff_base` and optionally the document if `doc` is not None
pub fn update_diff_base(&mut self, diff_base: Rope, doc: Option<Rope>) {
self.interned.clear();