diff options
author | Blaž Hrastnik | 2020-10-06 09:59:23 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2020-10-13 14:13:56 +0000 |
commit | 809827967687ea7e6b645e7a9a60f9c523250578 (patch) | |
tree | 15f0bf17d6528c55f638df9875e0cf951b315b01 /helix-core/src | |
parent | 1dba0f2b1ccc0c6a29e05876b7b7153373221f87 (diff) |
Cleanup
Diffstat (limited to 'helix-core/src')
-rw-r--r-- | helix-core/src/state.rs | 11 | ||||
-rw-r--r-- | helix-core/src/transaction.rs | 10 |
2 files changed, 2 insertions, 19 deletions
diff --git a/helix-core/src/state.rs b/helix-core/src/state.rs index ed0df9cf..d8aa3ed4 100644 --- a/helix-core/src/state.rs +++ b/helix-core/src/state.rs @@ -261,20 +261,11 @@ impl State { granularity: Granularity, count: usize, ) -> Selection { - // TODO: move all selections according to normal cursor move semantics by collapsing it + // move all selections according to normal cursor move semantics by collapsing it // into cursors and moving them vertically self.selection.transform(|range| { - // let pos = if !range.is_empty() { - // // if selection already exists, bump it to the start or end of current select first - // if dir == Direction::Backward { - // range.from() - // } else { - // range.to() - // } - // } else { let pos = self.move_pos(range.head, dir, granularity, count); - // }; Range::new(pos, pos) }) } diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs index 33612ecf..dfb1bbe1 100644 --- a/helix-core/src/transaction.rs +++ b/helix-core/src/transaction.rs @@ -45,12 +45,7 @@ impl ChangeSet { /// In other words, If `this` goes `docA` → `docB` and `other` represents `docB` → `docC`, the /// returned value will represent the change `docA` → `docC`. pub fn compose(self, other: ChangeSet) -> Result<Self, ()> { - // TODO: len before should match len after - - // if self.len != other.len { - // // length mismatch - // return Err(()); - // } + // TODO: len before b should match len after a let len = self.changes.len(); @@ -335,9 +330,6 @@ impl ChangeSet { } } -// trait Transaction -// trait StrictTransaction - /// Transaction represents a single undoable unit of changes. Several changes can be grouped into /// a single transaction. #[derive(Debug, Clone)] |