diff options
Diffstat (limited to 'helix-core')
-rw-r--r-- | helix-core/src/state.rs | 5 | ||||
-rw-r--r-- | helix-core/src/syntax.rs | 2 | ||||
-rw-r--r-- | helix-core/src/transaction.rs | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/helix-core/src/state.rs b/helix-core/src/state.rs index 150874b1..55ac5095 100644 --- a/helix-core/src/state.rs +++ b/helix-core/src/state.rs @@ -102,6 +102,11 @@ impl State { self.mode } + #[inline] + pub fn path(&self) -> Option<&PathBuf> { + self.path.as_ref() + } + // pub fn doc<R>(&self, range: R) -> RopeSlice // where // R: std::ops::RangeBounds<usize>, diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index c0b67f5d..1eb15633 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -173,7 +173,7 @@ impl LanguageLayer { self.tree.as_ref().unwrap() } - fn parse<'a>( + fn parse( &mut self, parser: &mut Parser, config: &HighlightConfiguration, diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs index ab32d5da..f6fbddf8 100644 --- a/helix-core/src/transaction.rs +++ b/helix-core/src/transaction.rs @@ -243,13 +243,13 @@ impl ChangeSet { let old_end = old_pos + len; match change { - Retain(_len) => { + Retain(_) => { if old_end > pos { return new_pos + (pos - old_pos); } new_pos += len; } - Delete(_len) => { + Delete(_) => { // a subsequent ins means a replace, consume it let ins = if let Some(Insert(s)) = iter.peek() { iter.next(); |