From 600ce70cf6d50ce37b96bfde90c6ade8db6cd8c3 Mon Sep 17 00:00:00 2001 From: WindSoilder Date: Tue, 21 Dec 2021 17:17:55 +0800 Subject: 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--- helix-view/src/document.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'helix-view') 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> { -- cgit v1.2.3-70-g09d2