aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
authorWindSoilder2021-12-21 09:17:55 +0000
committerGitHub2021-12-21 09:17:55 +0000
commit600ce70cf6d50ce37b96bfde90c6ade8db6cd8c3 (patch)
tree416df8cc2cee8b2c6fadf466d792425533e43e50 /helix-view
parent5b4540fc2d8201f4bfe336cc10c1096059217225 (diff)
Improve dedent behavior (#1232)
* tmp add code for dedent * finish normal_mode with dedent behavior * use function pointer * rebase from origin * check dedent condition inside normal_mode implementation * using if let... * fix check * using char_is_whitespace instead of ch.is_whitespace * fix clippy * abstract restore_indent function
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/document.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index 2cb33fe3..c71d1850 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -889,6 +889,10 @@ impl Document {
self.indent_style.as_str()
}
+ pub fn changes(&self) -> &ChangeSet {
+ &self.changes
+ }
+
#[inline]
/// File path on disk.
pub fn path(&self) -> Option<&PathBuf> {