diff options
author | Blaž Hrastnik | 2020-09-19 02:55:15 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2020-09-19 02:58:08 +0000 |
commit | 3859f6963dfad2d2d09c979a8e6bb283bc5e2cb3 (patch) | |
tree | e5203866fa9974ad22f6f191eb272ecda28c202f /helix-core/src | |
parent | eb477ec44276572497c121cb0d91eb56ac58cf26 (diff) |
More work on the UI.
Diffstat (limited to 'helix-core/src')
-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(); |