This PR provides a basic implementation of selections.
Firstly, we move back to representing the previous Marks as Regions, as that makes it significantly easier to reason about selections being active or not.
An alternative approach I kinda like would be to have Mark be one of
and distinguish based on that, rather than purely based on the length -- but that might just be unnecessary complexity.
I then add a new Operation Selection, in the process factor out MovementOp into a more general Motion enum, moving on to combining MovementOp and EditOp into a unified BufferOp.
This PR is based on #48, which should be merged first
This PR provides a basic implementation of selections.
Firstly, we move back to representing the previous
Mark
s asRegion
s, as that makes it significantly easier to reason about selections being active or not. An alternative approach I kinda like would be to haveMark
be one ofand distinguish based on that, rather than purely based on the length -- but that might just be unnecessary complexity.
I then add a new Operation
Selection
, in the process factor outMovementOp
into a more generalMotion
enum, moving on to combiningMovementOp
andEditOp
into a unifiedBufferOp
.This PR is based on #48, which should be merged first