diff options
author | Blaž Hrastnik | 2020-10-23 09:48:03 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2020-12-03 04:10:35 +0000 |
commit | cc6bdf8f66889087223d9a8491479ceecc09a663 (patch) | |
tree | a155b55868052007d3530327de087886a7d81b7f /helix-core/src/transaction.rs | |
parent | af1924404adac399c351a17bc0f43b5e2889abbb (diff) |
Text change generation, RPC call handling.
Diffstat (limited to 'helix-core/src/transaction.rs')
-rw-r--r-- | helix-core/src/transaction.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs index 9bd8c615..f1cb2ca1 100644 --- a/helix-core/src/transaction.rs +++ b/helix-core/src/transaction.rs @@ -5,8 +5,9 @@ use std::convert::TryFrom; /// (from, to, replacement) pub type Change = (usize, usize, Option<Tendril>); +// TODO: pub(crate) #[derive(Debug, Clone, PartialEq, Eq)] -pub(crate) enum Operation { +pub enum Operation { /// Move cursor by n characters. Retain(usize), /// Delete n characters. @@ -40,6 +41,12 @@ impl ChangeSet { } // TODO: from iter + // + + #[doc(hidden)] // used by lsp to convert to LSP changes + pub fn changes(&self) -> &[Operation] { + &self.changes + } #[must_use] fn len_after(&self) -> usize { |