Modules
Structs
History is a bounded double-ended Vec
of Operations
. Every-time a new change is
registered, it is added to the history. If the time elapsed since the last change is
greater than TIME_AFTER_WHICH_OPERATION_COMMITS
, a new operation is added to the
operations
VecDeque
. If not, the content of the back (last) operation is
mutated in place.
An Operation describe a text edition at a specific start position.
This module defines types which role is to abstract the different coordinate and indexing systems the editor has to support. Humans deal with line numbers, starting at 1, which maps to document rows, starting at 0. We define simple types in order to delegate the +1/-1 conversions to them, as it has proven easy to forget these only when dealing with usize values.